Changeset 20368
- Timestamp:
- 10/01/08 16:38:25 (3 months ago)
- Location:
- lang/ruby/nario/nario
- Files:
-
- 3 modified
-
life.rb (modified) (2 diffs)
-
life/nario.rb (modified) (1 diff)
-
scene/flowworld.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/nario/nario/life.rb
r20294 r20368 74 74 end 75 75 76 def state 77 "x->#{@x} y->#{@y}" 78 end 79 76 80 def head_range 77 81 {:x_range => (@x+@w/6)..(@x+@w-@w/6), :y_range => @y..(@y+@h/6), :event => ("collide_#{extract_class_name(self)}_head".to_sym)} … … 106 110 alias collide_pipe_left collide_floor_left 107 111 alias collide_pipe_right collide_floor_right 108 109 112 110 113 private -
lang/ruby/nario/nario/life/nario.rb
r20294 r20368 155 155 @y = w.y + w.h + 5 156 156 end 157 158 def state 159 "x=#{@x} y=#{@y} dash_speed=#{@dash_speed} jump?#{@is_jumpping} fly?#{@is_fly} goal?#{@is_goal}" 160 end 157 161 end 158 162 end -
lang/ruby/nario/nario/scene/flowworld.rb
r20294 r20368 17 17 def render(screen) 18 18 @renders.each{|re| re.each{|o| o.put_screen(screen) if o.x < SCREEN_WIDTH } } 19 puts "player: x -> #{@player.x} y -> #{@player.y}" if $DEBUG_PLAYER_WATCH_MODE19 puts "player: #{@player.state}" if $DEBUG_PLAYER_WATCH_MODE 20 20 @player.put_screen(screen) 21 21 end
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)