Phaser API Documentation

  Version: 
Filter

A base Phaser.Scene class which can be extended for your own use.

You can also define the optional methods init(), preload(), and create().

Constructor:

new Scene(config)

Parameters:

name type description
config string | Phaser.Types.Scenes.SettingsConfig

Scene specific configuration settings.

Since: 3.0.0
Source: src/scene/Scene.js (Line 10)

Members

Description:

The Scene Game Object Factory.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 126)
Focus
Focus

Description:

A reference to the global Animation Manager.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 49)
Focus
Focus

Description:

A reference to the global Cache.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 60)
Focus
Focus

Description:

The Scene Camera Manager.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 115)
Focus
Focus

Description:

The Game Object Display List belonging to this Scene.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 159)
Focus
Focus

Description:

A Scene specific Data Manager Plugin.

See the registry property for the global Data Manager.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 181)
Focus
Focus

Description:

A Scene specific Event Emitter.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 104)
Focus
Focus

Description:

The Facebook Instant Games Plugin.

This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.

Type:
Since: 3.12.0
Source: src/scene/Scene.js (Line 262)
Focus
Focus
game: Phaser.Game
Focus
Focus

Description:

A reference to the Phaser.Game instance.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 38)
Focus
Focus

Description:

The Scene Input Manager Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 194)
Focus
Focus

Description:

The Scene Lights Manager Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 170)
Focus
Focus

Description:

The Scene Loader Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 205)
Focus
Focus

Description:

The Scene Game Object Creator.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 137)
Focus
Focus

Description:

The Scene Matter Physics Plugin.

This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 249)
Focus
Focus

Description:

The Scene Arcade Physics Plugin.

This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 238)
Focus
Focus

Description:

A reference to the global 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.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 285)
Focus
Focus

Description:

A reference to the global Data Manager.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 71)
Focus
Focus

Description:

A reference to the renderer instance Phaser is using, either Canvas Renderer or WebGL Renderer.

Type:
Since: 3.50.0
Source: src/scene/Scene.js (Line 297)
Focus
Focus

Description:

A reference to the global Scale Manager.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.16.2
Source: src/scene/Scene.js (Line 274)
Focus
Focus

Description:

A reference to the Scene Manager Plugin.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 148)
Focus
Focus

Description:

A reference to the Sound Manager.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 82)
Focus
Focus

Description:

The Scene Systems. You must never overwrite this property, or all hell will break lose.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 29)
Focus
Focus

Description:

A reference to the Texture Manager.

This property will only be available if defined in the Scene Injection Map.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 93)
Focus
Focus

Description:

The Scene Time and Clock Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 216)
Focus
Focus

Description:

The Scene Tween Manager Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Type:
Since: 3.0.0
Source: src/scene/Scene.js (Line 227)
Focus
Focus

Methods

update(time, delta)
Focus
Focus

Description:

This method should be overridden by your own Scenes.

This method is called once per game step while the scene is running.

Parameters:

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.

Since: 3.0.0
Source: src/scene/Scene.js (Line 307)
Focus
Focus