Class: GameState
- Inherits:
-
Object
show all
- Defined in:
- lib/game_states/game_state.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.switch(new_state) ⇒ Object
3
4
5
6
7
|
# File 'lib/game_states/game_state.rb', line 3
def self.switch(new_state)
$window.state && $window.state.leave
$window.state = new_state
new_state.enter
end
|
Instance Method Details
25
26
|
# File 'lib/game_states/game_state.rb', line 25
def button_down(id)
end
|
#draw ⇒ Object
15
16
|
# File 'lib/game_states/game_state.rb', line 15
def draw
end
|
#enter ⇒ Object
9
10
|
# File 'lib/game_states/game_state.rb', line 9
def enter
end
|
#leave ⇒ Object
12
13
|
# File 'lib/game_states/game_state.rb', line 12
def leave
end
|
#needs_redraw? ⇒ Boolean
21
22
23
|
# File 'lib/game_states/game_state.rb', line 21
def needs_redraw?
true
end
|
#update ⇒ Object
18
19
|
# File 'lib/game_states/game_state.rb', line 18
def update
end
|