The Phaser.Game instance this Scene Manager belongs to.
Scene specific configuration settings.
Do any of the Cameras in any of the Scenes require a custom viewport? If not we can skip scissor tests.
The Game that this SceneManager belongs to.
ReadonlyisHas the Scene Manager properly started?
ReadonlyisIs the Scene Manager actively processing the Scenes list?
An object that maps the keys to the scene so we can quickly get a scene from a key without iteration.
The array in which all of the scenes are kept.
This system Scene is created during bootQueue and is a default
empty Scene that lives outside of the Scene list, but can be used
by plugins and managers that need access to a live Scene, without
being tied to one.
Adds a new Scene into the SceneManager. You must give each Scene a unique key by which you'll identify it.
The sceneConfig can be:
Phaser.Scene object, or an object that extends it.Phaser.SceneIf a function is given then a new Scene will be created by calling it.
A unique key used to reference the Scene, i.e. MainMenu or Level1.
The config for the Scene
OptionalautoStart: booleanIf true the Scene will be started immediately after being added. Default false.
Optionaldata: objectOptional data object. This will be set as Scene.settings.data and passed to Scene.init, and Scene.create.
Destroy this Scene Manager and all of its systems.
This process cannot be reversed.
This method is called automatically when a Phaser Game instance is destroyed.
Dumps debug information about each Scene to the developer console.
Returns an array of all the current Scenes being managed by this Scene Manager.
You can filter the output by the active state of the Scene and choose to have the array returned in normal or reversed order.
OptionalisActive: booleanOnly include Scene's that are currently active? Default true.
OptionalinReverse: booleanReturn the array of Scenes in reverse? Default false.
Moves a Scene so it is immediately above another Scene in the Scenes list. If the Scene is already above the other, it isn't moved.
This means it will render over the top of the other Scene.
Moves a Scene so it is immediately below another Scene in the Scenes list. If the Scene is already below the other, it isn't moved.
This means it will render behind the other Scene.
Process the Scene operations queue.
Removes a Scene from the SceneManager.
The Scene is removed from the local scenes array, it's key is cleared from the keys cache and Scene.Systems.destroy is then called on it.
If the SceneManager is processing the Scenes when this method is called it will queue the operation for the next update sequence.
A unique key used to reference the Scene, i.e. MainMenu or Level1.
Renders the Scenes.
The renderer to use.
Runs the given Scene.
If the given Scene is paused, it will resume it. If sleeping, it will wake it. If not running at all, it will be started.
Use this if you wish to open a modal Scene by calling pause on the current
Scene, then run on the modal Scene.
The Scene to run.
Optionaldata: objectA data object that will be passed to the Scene on start, wake, or resume.
Starts the given Scene, if it is not starting, loading, or creating.
If the Scene is running, paused, or sleeping, it will be shutdown and then started.
The Scene to start.
Optionaldata: objectOptional data object to pass to Scene.Settings and Scene.init, and Scene.create.
Updates the Scenes.
Time elapsed.
Delta time from the last update.
The Scene Manager.
The Scene Manager is a Game level system, responsible for creating, processing and updating all of the Scenes in a Game instance.
You should not usually interact directly with the Scene Manager at all. Instead, you should use the Scene Plugin, which is available from every Scene in your game via the
this.sceneproperty.Using methods in this Scene Manager directly will break queued operations and can cause runtime errors. Instead, go via the Scene Plugin. Every feature this Scene Manager provides is also available via the Scene Plugin.