Module: Chingu::Helpers::GameState
Overview
push_game_state accepts either a class inherited from GameState or an object-instance from such a class.
It will make call new() on a class, and just push an object.
Instance Method Summary collapse
-
#clear_game_states ⇒ Object
def previous_game_state game_state_manager.previous_game_state end.
- #current_game_state ⇒ Object
- #game_states ⇒ Object
- #pop_game_state(options = {}) ⇒ Object
- #push_game_state(state, options = {}) ⇒ Object
- #switch_game_state(state, options = {}) ⇒ Object
- #transitional_game_state(state, options = {}) ⇒ Object
Instance Method Details
#clear_game_states ⇒ Object
def previous_game_state
game_state_manager.previous_game_state
end
60 61 62 |
# File 'lib/chingu/helpers/game_state.rb', line 60 def clear_game_states game_state_manager.clear_game_states end |
#current_game_state ⇒ Object
52 53 54 |
# File 'lib/chingu/helpers/game_state.rb', line 52 def current_game_state game_state_manager.current_game_state end |
#game_states ⇒ Object
32 33 34 |
# File 'lib/chingu/helpers/game_state.rb', line 32 def game_states game_state_manager.game_states end |
#pop_game_state(options = {}) ⇒ Object
40 41 42 |
# File 'lib/chingu/helpers/game_state.rb', line 40 def pop_game_state( = {}) game_state_manager.pop_game_state() end |
#push_game_state(state, options = {}) ⇒ Object
36 37 38 |
# File 'lib/chingu/helpers/game_state.rb', line 36 def push_game_state(state, = {}) game_state_manager.push_game_state(state, ) end |
#switch_game_state(state, options = {}) ⇒ Object
44 45 46 |
# File 'lib/chingu/helpers/game_state.rb', line 44 def switch_game_state(state, = {}) game_state_manager.switch_game_state(state, ) end |
#transitional_game_state(state, options = {}) ⇒ Object
48 49 50 |
# File 'lib/chingu/helpers/game_state.rb', line 48 def transitional_game_state(state, = {}) game_state_manager.transitional_game_state(state, ) end |