Class: Basher::UI::DebugView
- Defined in:
- lib/basher/ui/debug_view.rb
Instance Attribute Summary collapse
-
#game ⇒ Object
Returns the value of attribute game.
-
#last_input ⇒ Object
Returns the value of attribute last_input.
Attributes inherited from BaseView
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BaseView
#clear, #initialize, #resize_and_reposition, #will_resize!
Constructor Details
This class inherits a constructor from Basher::UI::BaseView
Instance Attribute Details
#game ⇒ Object
Returns the value of attribute game.
4 5 6 |
# File 'lib/basher/ui/debug_view.rb', line 4 def game @game end |
#last_input ⇒ Object
Returns the value of attribute last_input.
5 6 7 |
# File 'lib/basher/ui/debug_view.rb', line 5 def last_input @last_input end |
Class Method Details
.lines ⇒ Object
7 8 9 |
# File 'lib/basher/ui/debug_view.rb', line 7 def self.lines 1 end |
Instance Method Details
#setup ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/basher/ui/debug_view.rb', line 11 def setup draw_text = -> { setup_left_part setup_right_part } if game.state.in_game? clear render every: 0.04 do draw_text.call end else clear draw_text.call end end |