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.Scene
If a function is given then a new Scene will be created by calling it.
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
A unique key used to reference the Scene, i.e. |
||
sceneConfig | function | Phaser.Scene | Phaser.Types.Scenes.SettingsConfig | Phaser.Types.Scenes.CreateSceneFromObjectConfig |
The config for the Scene |
||
autoStart | boolean | <optional> | false |
If |
data | object | <optional> |
Optional data object. This will be set as |
The added Scene, if it was added immediately, otherwise null
.