Class: Asteroids::GameState
- Inherits:
-
Object
- Object
- Asteroids::GameState
- Defined in:
- lib/asteroids/states/game_state.rb
Class Method Summary collapse
Instance Method Summary collapse
- #button_down(id) ⇒ Object
- #draw ⇒ Object
- #enter ⇒ Object
- #leave ⇒ Object
- #needs_redraw? ⇒ Boolean
- #update ⇒ Object
Class Method Details
.switch(new_state) ⇒ Object
4 5 6 7 8 |
# File 'lib/asteroids/states/game_state.rb', line 4 def self.switch(new_state) $window.state && $window.state.leave $window.state = new_state new_state.enter end |
Instance Method Details
#button_down(id) ⇒ Object
26 27 |
# File 'lib/asteroids/states/game_state.rb', line 26 def (id) end |
#draw ⇒ Object
16 17 |
# File 'lib/asteroids/states/game_state.rb', line 16 def draw end |
#enter ⇒ Object
10 11 |
# File 'lib/asteroids/states/game_state.rb', line 10 def enter end |
#leave ⇒ Object
13 14 |
# File 'lib/asteroids/states/game_state.rb', line 13 def leave end |
#needs_redraw? ⇒ Boolean
22 23 24 |
# File 'lib/asteroids/states/game_state.rb', line 22 def needs_redraw? true end |
#update ⇒ Object
19 20 |
# File 'lib/asteroids/states/game_state.rb', line 19 def update end |