Changeset 12542
- Timestamp:
- 05/27/08 18:57:10 (5 years ago)
- Location:
- lang/ruby/RogueLike/rogue_like
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/RogueLike/rogue_like/controller.rb
r12291 r12542 25 25 if Input.triggers(:keyboard).include?(:r) 26 26 update_start(model) 27 elsif Input.triggers(:keyboard).include?(:d) 28 model.toggle_debug_mode 27 29 # elsif Input.repeatings(:mouse).include?(:left) 28 30 # model.activate_charas -
lang/ruby/RogueLike/rogue_like/model.rb
r12539 r12542 9 9 module RogueLike 10 10 class Model 11 attr_reader :state, : map, :charas11 attr_reader :state, :debug_mode, :map, :charas 12 12 13 13 def initialize … … 20 20 21 21 def start_playing 22 @state = :playing 22 @state = :playing 23 @debug_mode = nil 23 24 make_map 24 25 make_charas 25 26 @ass_wp = Workpile.new # A* 探索用のワークパイル 27 end 28 29 def toggle_debug_mode 30 @debug_mode = (not @debug_mode) 26 31 end 27 32 -
lang/ruby/RogueLike/rogue_like/view.rb
r12530 r12542 48 48 model.charas.each_with_index do |chara, idx| 49 49 window.render_texture(@textures[:chara], chara.x, chara.y) 50 render_text(window, idx.to_s, chara.x, chara.y, true) 50 render_text(window, idx.to_s, chara.x, chara.y, true) if model.debug_mode 51 51 end 52 52
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)