Constdefault state ID for Credits Stage
default state ID for the default Stage (the default stage is the one running as soon as melonJS is started)
default state ID for Game End Stage
default state ID for Game Over Stage
default state ID for Loading Stage
default state ID for Menu Stage
default state ID for Play Stage
default state ID for "Ready" Stage
default state ID for High Score Stage
default state ID for Settings Stage
default state ID for user defined constants
change the game/app state
State ID (see constants)
OptionalforceChange: boolean = falseif true the state will be changed immediately (without waiting for the next frame)
extra arguments to be passed to the reset functions
return a reference to the current stage
useful to call a object specific method
the current Stage instance, or undefined if no stage is active
returns the stage associated with the specified state (or the current one if none is specified)
OptionalstateId: number = _stateState ID (see constants)
the Stage instance associated with the given state ID, or undefined
return true if the specified state is the current one
State ID (see constants)
true if the specified state is the current one
Return the pause state of the state manager
true if the game is paused
return the running state of the state manager
true if a "process is running"
pause the current stage
Optionalmusic: boolean = falsepause current music track on screen pause
Restart the current stage from a full stop.
Optionalmusic: boolean = falseresume current music track on screen resume
resume the current stage
Optionalmusic: boolean = falseresume current music track on screen resume
associate the specified state with a Stage
State ID (see constants)
Instantiated Stage to associate with state ID
Optionalstart: boolean = falseif true the state will be changed immediately after adding it.
enable/disable the transition to a particular state (by default enabled for all)
State ID (see constants)
true to enable transition, false to disable
Stop the current stage.
OptionalshouldPauseTrack: boolean = falsepause current track on screen stop.
specify a global transition effect
(only "fade" is supported for now)
a CSS color value
Optionalduration: numberexpressed in milliseconds
a State Manager (state machine)