Methods
-
statemanager_add_state(name, key)
-
Adds a state to the game with the given name and key.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description name
String name of the new state
key
tag to use for the state
Code Equivalent:
game.state.add('key', name);
-
statemanager_check_state(key)
-
Returns true or false if the state with the given tag is valid.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description key
String tag of the state to check
Code Equivalent:
game.state.checkState(key)
-
statemanager_get_current_state()
-
Returns the state that is currently running.
Check out the third party documentation for a more in depth explanation.Code Equivalent:
game.state.getCurrentState()
-
statemanager_restart_state()
-
Restarts the current state.
Check out the third party documentation for a more in depth explanation.Code Equivalent:
game.state.restart();
-
statemanager_start_state(tag)
-
Start the state with the given tag.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description tag
tag of the state to start
Code Equivalent:
game.state.start('tag');