A base Phaser.Scene class which can be extended for your own use.
You can also define the optional methods init(), preload(), and create().
new Scene(config)
name | type | description |
---|---|---|
config | string | Phaser.Types.Scenes.SettingsConfig |
Scene specific configuration settings. |
A scene level Game Object Factory. This property will only be available if defined in the Scene Injection Map.
A reference to the global Animation Manager. This property will only be available if defined in the Scene Injection Map.
A reference to the global Cache. This property will only be available if defined in the Scene Injection Map.
A scene level Camera System. This property will only be available if defined in the Scene Injection Map.
A scene level Game Object Display List. This property will only be available if defined in the Scene Injection Map.
A scene level Data Manager Plugin. This property will only be available if defined in the Scene Injection Map and the plugin is installed.
A scene level Event Emitter. This property will only be available if defined in the Scene Injection Map.
A scene level Facebook Instant Games Plugin. This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
A reference to the Phaser.Game instance. This property will only be available if defined in the Scene Injection Map.
A scene level Input Manager Plugin. This property will only be available if defined in the Scene Injection Map and the plugin is installed.
A scene level Lights Manager Plugin. This property will only be available if defined in the Scene Injection Map and the plugin is installed.
A scene level Loader Plugin. This property will only be available if defined in the Scene Injection Map and the plugin is installed.
A scene level Game Object Creator. This property will only be available if defined in the Scene Injection Map.
A scene level Matter Physics Plugin. This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
A scene level Arcade Physics Plugin. This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
A reference to the Plugin Manager.
The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install those plugins into Scenes as required.
A reference to the game level Data Manager. This property will only be available if defined in the Scene Injection Map.
A reference to the renderer instance Phaser is using, either Canvas or WebGL.
A reference to the global Scale Manager. This property will only be available if defined in the Scene Injection Map.
A reference to the Scene Manager Plugin. This property will only be available if defined in the Scene Injection Map.
A reference to the Sound Manager. This property will only be available if defined in the Scene Injection Map and the plugin is installed.
The Scene Systems. You must never overwrite this property, or all hell will break lose.
A reference to the Texture Manager. This property will only be available if defined in the Scene Injection Map.
A scene level Time and Clock Plugin. This property will only be available if defined in the Scene Injection Map and the plugin is installed.
A scene level Tween Manager Plugin. This property will only be available if defined in the Scene Injection Map and the plugin is installed.
Should be overridden by your own Scenes. This method is called once per game step while the scene is running.
name | type | description |
---|---|---|
time | number |
The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. |
delta | number |
The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. |