StateManager#onUpdateCallback
  • References/Game Development/Phaser/Game States/StateManager

onUpdateCallback : Function This is called when the state is updated, every game loop. It doesn't happen during preload (@see

2025-01-10 15:47:30
StateManager#current
  • References/Game Development/Phaser/Game States/StateManager

current : string The current active State object. Source code:

2025-01-10 15:47:30
State#add
  • References/Game Development/Phaser/Game States/State

add : Phaser.GameObjectFactory

2025-01-10 15:47:30
StateManager#onLoadUpdateCallback
  • References/Game Development/Phaser/Game States/StateManager

onLoadUpdateCallback : Function This is called when the State is updated during the preload phase.

2025-01-10 15:47:30
StateManager#onResizeCallback
  • References/Game Development/Phaser/Game States/StateManager

onResizeCallback : Function This is called if ScaleManager.scalemode is RESIZE and a resize event occurs. It's passed the new width

2025-01-10 15:47:30
StateManager#onPauseUpdateCallback
  • References/Game Development/Phaser/Game States/StateManager

onPauseUpdateCallback : Function This is called every frame while the game is paused.

2025-01-10 15:47:30
StateManager#add()
  • References/Game Development/Phaser/Game States/StateManager

add(key, state, autoStart) Adds a new State into the StateManager. You must give each State a unique key

2025-01-10 15:47:30
State#cache
  • References/Game Development/Phaser/Game States/State

cache : Phaser.Cache A reference to the game cache which

2025-01-10 15:47:30
StateManager#preUpdate()
  • References/Game Development/Phaser/Game States/StateManager

preUpdate() preUpdate is called right at the start of the game loop. It is responsible for changing to a new state that was requested

2025-01-10 15:47:30
StateManager#destroy()
  • References/Game Development/Phaser/Game States/StateManager

destroy() Removes all StateManager callback references to the State object, nulls the game reference and clears the States object.

2025-01-10 15:47:30