Class: Scene

Phaser. Scene

[description]


new Scene(config)

Parameters:
Name Type Description
config string | Phaser.Scenes.Settings.Config

Scene specific configuration settings.

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

Members


add :Phaser.GameObjects.GameObjectFactory

A scene level 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 116)

anims :Phaser.Animations.AnimationManager

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 46)

cache :Phaser.Cache.CacheManager

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 56)

cameras :Phaser.Cameras.Scene2D.CameraManager

A scene level Camera System.
This property will only be available if defined in the Scene Injection Map.

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

children :Phaser.GameObjects.DisplayList

A scene level Game Object Display List.
This property will only be available if defined in the Scene Injection Map.

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

data :Phaser.Data.DataManager

A scene level Data 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 166)

events :Phaser.Events.EventEmitter

A scene level 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 96)

game :Phaser.Game

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 36)

impact :Phaser.Physics.Impact.ImpactPhysics

A scene level Impact 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 226)

input :Phaser.Input.InputPlugin

A scene level 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 176)

lights :Phaser.GameObjects.LightsManager

A scene level 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 156)

load :Phaser.Loader.LoaderPlugin

A scene level 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 186)

make :Phaser.GameObjects.GameObjectCreator

A scene level 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 126)

matter :Phaser.Physics.Matter.MatterPhysics

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.

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

physics :Phaser.Physics.Arcade.ArcadePhysics

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.

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

registry :Phaser.Data.DataManager

A reference to the game level 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 66)

scene :Phaser.Scenes.ScenePlugin

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 136)

sound :Phaser.Sound.BaseSoundManager

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 76)

sys :Phaser.Scenes.Systems

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 27)

textures :Phaser.Textures.TextureManager

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 86)

time :Phaser.Time.Clock

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.

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

tweens :Phaser.Tweens.TweenManager

A scene level 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 206)

Methods


update(time, delta)

Should be overridden by your own Scenes.

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 247)