Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Scene.js to clarify that scene properties are undefined in constructor #7039

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/scene/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ var Scene = new Class({

/**
* A reference to the Phaser.Game instance.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -48,6 +50,8 @@ var Scene = new Class({

/**
* A reference to the global Animation Manager.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -59,6 +63,8 @@ var Scene = new Class({

/**
* A reference to the global Cache.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -70,6 +76,8 @@ var Scene = new Class({

/**
* A reference to the global Data Manager.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -81,6 +89,8 @@ var Scene = new Class({

/**
* A reference to the Sound Manager.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map and the plugin is installed.
*
Expand All @@ -92,6 +102,8 @@ var Scene = new Class({

/**
* A reference to the Texture Manager.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -103,6 +115,8 @@ var Scene = new Class({

/**
* A Scene specific Event Emitter.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -114,6 +128,8 @@ var Scene = new Class({

/**
* The Scene Camera Manager.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -125,6 +141,8 @@ var Scene = new Class({

/**
* The Scene Game Object Factory.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -136,6 +154,8 @@ var Scene = new Class({

/**
* The Scene Game Object Creator.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -147,6 +167,8 @@ var Scene = new Class({

/**
* A reference to the Scene Manager Plugin.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -158,6 +180,8 @@ var Scene = new Class({

/**
* The Game Object Display List belonging to this Scene.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -169,6 +193,8 @@ var Scene = new Class({

/**
* The Scene Lights Manager Plugin.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map and the plugin is installed.
*
Expand All @@ -180,6 +206,8 @@ var Scene = new Class({

/**
* A Scene specific Data Manager Plugin.
*
* Note: will be undefined in scene's constructor.
*
* See the `registry` property for the global Data Manager.
*
Expand All @@ -193,6 +221,8 @@ var Scene = new Class({

/**
* The Scene Input Manager Plugin.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map and the plugin is installed.
*
Expand All @@ -204,6 +234,8 @@ var Scene = new Class({

/**
* The Scene Loader Plugin.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map and the plugin is installed.
*
Expand All @@ -215,6 +247,8 @@ var Scene = new Class({

/**
* The Scene Time and Clock Plugin.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map and the plugin is installed.
*
Expand All @@ -226,6 +260,8 @@ var Scene = new Class({

/**
* The Scene Tween Manager Plugin.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map and the plugin is installed.
*
Expand All @@ -237,6 +273,8 @@ var Scene = new Class({

/**
* The Scene Arcade Physics Plugin.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
*
Expand All @@ -248,6 +286,8 @@ var Scene = new Class({

/**
* The Scene Matter Physics Plugin.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
*
Expand All @@ -261,6 +301,8 @@ var Scene = new Class({
{
/**
* The Facebook Instant Games Plugin.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
*
Expand All @@ -273,6 +315,8 @@ var Scene = new Class({

/**
* A reference to the global Scale Manager.
*
* Note: will be undefined in scene's constructor.
*
* This property will only be available if defined in the Scene Injection Map.
*
Expand All @@ -284,6 +328,8 @@ var Scene = new Class({

/**
* A reference to the global Plugin Manager.
*
* Note: will be undefined in scene's constructor.
*
* 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.
Expand All @@ -296,6 +342,8 @@ var Scene = new Class({

/**
* A reference to the renderer instance Phaser is using, either Canvas Renderer or WebGL Renderer.
*
* Note: will be undefined in scene's constructor.
*
* @name Phaser.Scene#renderer
* @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}
Expand Down