Module: Chingu::Helpers::GameState

Included in:
GameState, Window
Defined in:
lib/chingu/helpers/game_state.rb

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

Instance Method Details

#clear_game_statesObject



62
63
64
65
# File 'lib/chingu/helpers/game_state.rb', line 62

def clear_game_states
  #$window.game_state_manager.clear_game_states
  game_state_manager.clear_game_states
end

#current_game_stateObject



52
53
54
55
# File 'lib/chingu/helpers/game_state.rb', line 52

def current_game_state
  ##$window.game_state_manager.current_game_state
  game_state_manager.current_game_state
end

#pop_game_state(options = {}) ⇒ Object



37
38
39
40
# File 'lib/chingu/helpers/game_state.rb', line 37

def pop_game_state(options = {})
  #$window.game_state_manager.pop_game_state(options)
  game_state_manager.pop_game_state(options)
end

#previous_game_stateObject



57
58
59
60
# File 'lib/chingu/helpers/game_state.rb', line 57

def previous_game_state
  ##$window.game_state_manager.previous_game_state
  game_state_manager.previous_game_state
end

#push_game_state(state, options = {}) ⇒ Object



32
33
34
35
# File 'lib/chingu/helpers/game_state.rb', line 32

def push_game_state(state, options = {})
  #$window.game_state_manager.push_game_state(state, options)
  game_state_manager.push_game_state(state, options)
end

#switch_game_state(state, options = {}) ⇒ Object



42
43
44
45
# File 'lib/chingu/helpers/game_state.rb', line 42

def switch_game_state(state, options = {})
  #$window.game_state_manager.switch_game_state(state, options)
  game_state_manager.switch_game_state(state, options)
end

#transitional_game_state(state, options = {}) ⇒ Object



47
48
49
50
# File 'lib/chingu/helpers/game_state.rb', line 47

def transitional_game_state(state, options = {})
  ##$window.game_state_manager.transitional_game_state(state, options)
  game_state_manager.transitional_game_state(state, options)
end