mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 15:41:37 +00:00
Documented the ScenePlugin class.
This commit is contained in:
parent
7eb0342663
commit
e047977f52
2 changed files with 57 additions and 48 deletions
|
@ -890,7 +890,7 @@ var SceneManager = new Class({
|
|||
* @method Phaser.Scenes.SceneManager#sleep
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - The Scene to sleep.
|
||||
* @param {string} key - The Scene to put to sleep.
|
||||
*
|
||||
* @return {Phaser.Scenes.SceneManager} This SceneManager.
|
||||
*/
|
||||
|
@ -935,7 +935,7 @@ var SceneManager = new Class({
|
|||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - The Scene to start.
|
||||
* @param {object} [data] - Scene config data.
|
||||
* @param {object} [data] - The Scene data.
|
||||
*
|
||||
* @return {Phaser.Scenes.SceneManager} This SceneManager.
|
||||
*/
|
||||
|
@ -1091,7 +1091,7 @@ var SceneManager = new Class({
|
|||
* @method Phaser.Scenes.SceneManager#bringToTop
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to affect.
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to move.
|
||||
*
|
||||
* @return {Phaser.Scenes.SceneManager} This SceneManager.
|
||||
*/
|
||||
|
@ -1125,7 +1125,7 @@ var SceneManager = new Class({
|
|||
* @method Phaser.Scenes.SceneManager#sendToBack
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to affect.
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to move.
|
||||
*
|
||||
* @return {Phaser.Scenes.SceneManager} This SceneManager.
|
||||
*/
|
||||
|
@ -1157,7 +1157,7 @@ var SceneManager = new Class({
|
|||
* @method Phaser.Scenes.SceneManager#moveDown
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to affect.
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to move.
|
||||
*
|
||||
* @return {Phaser.Scenes.SceneManager} This SceneManager.
|
||||
*/
|
||||
|
@ -1191,7 +1191,7 @@ var SceneManager = new Class({
|
|||
* @method Phaser.Scenes.SceneManager#moveUp
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to affect.
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to move.
|
||||
*
|
||||
* @return {Phaser.Scenes.SceneManager} This SceneManager.
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@ var PluginManager = require('../boot/PluginManager');
|
|||
* @constructor
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Scene} scene - [description]
|
||||
* @param {Phaser.Scene} scene - The Scene that this ScenePlugin belongs to.
|
||||
*/
|
||||
var ScenePlugin = new Class({
|
||||
|
||||
|
@ -26,7 +26,7 @@ var ScenePlugin = new Class({
|
|||
function ScenePlugin (scene)
|
||||
{
|
||||
/**
|
||||
* [description]
|
||||
* The Scene that this ScenePlugin belongs to.
|
||||
*
|
||||
* @name Phaser.Scenes.ScenePlugin#scene
|
||||
* @type {Phaser.Scene}
|
||||
|
@ -35,7 +35,7 @@ var ScenePlugin = new Class({
|
|||
this.scene = scene;
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* The Scene Systems instance of the Scene that this ScenePlugin belongs to.
|
||||
*
|
||||
* @name Phaser.Scenes.ScenePlugin#systems
|
||||
* @type {Phaser.Scenes.Systems}
|
||||
|
@ -49,7 +49,7 @@ var ScenePlugin = new Class({
|
|||
}
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* The settings of the Scene this ScenePlugin belongs to.
|
||||
*
|
||||
* @name Phaser.Scenes.ScenePlugin#settings
|
||||
* @type {SettingsObject}
|
||||
|
@ -58,7 +58,7 @@ var ScenePlugin = new Class({
|
|||
this.settings = scene.sys.settings;
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* The key of the Scene this ScenePlugin belongs to.
|
||||
*
|
||||
* @name Phaser.Scenes.ScenePlugin#key
|
||||
* @type {string}
|
||||
|
@ -67,7 +67,7 @@ var ScenePlugin = new Class({
|
|||
this.key = scene.sys.settings.key;
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* The Game's SceneManager.
|
||||
*
|
||||
* @name Phaser.Scenes.ScenePlugin#manager
|
||||
* @type {Phaser.Scenes.SceneManager}
|
||||
|
@ -77,7 +77,9 @@ var ScenePlugin = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Boot the ScenePlugin.
|
||||
*
|
||||
* Registers event handlers.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#boot
|
||||
* @since 3.0.0
|
||||
|
@ -96,8 +98,8 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#start
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {object} [data] - [description]
|
||||
* @param {string} key - The Scene to start.
|
||||
* @param {object} [data] - The Scene data.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -125,9 +127,9 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#add
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {object} sceneConfig - [description]
|
||||
* @param {boolean} autoStart - [description]
|
||||
* @param {string} key - The Scene key.
|
||||
* @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The config for the Scene.
|
||||
* @param {boolean} autoStart - Whether to start the Scene after it's added.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -144,8 +146,8 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#launch
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {object} [data] - [description]
|
||||
* @param {string} key - The Scene to launch.
|
||||
* @param {object} [data] - The Scene data.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -172,7 +174,7 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#pause
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to pause.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -191,7 +193,7 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#resume
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to resume.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -210,7 +212,7 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#sleep
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to put to sleep.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -229,7 +231,7 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#wake
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to wake up.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -248,7 +250,7 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#switch
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to start.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -275,7 +277,7 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#stop
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to stop.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -294,7 +296,7 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#setActive
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {boolean} value - [description]
|
||||
* @param {boolean} value - The Scene to set the active state for.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -311,7 +313,7 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#setVisible
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {boolean} value - [description]
|
||||
* @param {boolean} value - The Scene to set the visible state for.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -328,9 +330,9 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#isSleeping
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to check.
|
||||
*
|
||||
* @return {boolean} [description]
|
||||
* @return {boolean} Whether the Scene is sleeping.
|
||||
*/
|
||||
isSleeping: function (key)
|
||||
{
|
||||
|
@ -345,9 +347,9 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#isActive
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to check.
|
||||
*
|
||||
* @return {boolean} [description]
|
||||
* @return {boolean} Whether the Scene is active.
|
||||
*/
|
||||
isActive: function (key)
|
||||
{
|
||||
|
@ -362,9 +364,9 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#isVisible
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to check.
|
||||
*
|
||||
* @return {boolean} [description]
|
||||
* @return {boolean} Whether the Scene is visible.
|
||||
*/
|
||||
isVisible: function (key)
|
||||
{
|
||||
|
@ -375,6 +377,7 @@ var ScenePlugin = new Class({
|
|||
|
||||
/**
|
||||
* Swaps the position of two scenes in the Scenes list.
|
||||
*
|
||||
* This controls the order in which they are rendered and updated.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#swapPosition
|
||||
|
@ -399,6 +402,7 @@ var ScenePlugin = new Class({
|
|||
|
||||
/**
|
||||
* Swaps the position of two scenes in the Scenes list, so that Scene B is directly above Scene A.
|
||||
*
|
||||
* This controls the order in which they are rendered and updated.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#moveAbove
|
||||
|
@ -423,6 +427,7 @@ var ScenePlugin = new Class({
|
|||
|
||||
/**
|
||||
* Swaps the position of two scenes in the Scenes list, so that Scene B is directly below Scene A.
|
||||
*
|
||||
* This controls the order in which they are rendered and updated.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#moveBelow
|
||||
|
@ -457,7 +462,7 @@ var ScenePlugin = new Class({
|
|||
* @method Phaser.Scenes.ScenePlugin#remove
|
||||
* @since 3.2.0
|
||||
*
|
||||
* @param {(string|Phaser.Scene)} scene - The Scene to be removed.
|
||||
* @param {(string|Phaser.Scene)} key - The Scene to be removed.
|
||||
*
|
||||
* @return {Phaser.Scenes.SceneManager} This SceneManager.
|
||||
*/
|
||||
|
@ -471,12 +476,12 @@ var ScenePlugin = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Moves a Scene up one position in the Scenes list.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#moveUp
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to move.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -490,12 +495,12 @@ var ScenePlugin = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Moves a Scene down one position in the Scenes list.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#moveDown
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to move.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -509,12 +514,14 @@ var ScenePlugin = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Brings a Scene to the top of the Scenes list.
|
||||
*
|
||||
* This means it will render above all other Scenes.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#bringToTop
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to move.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -528,12 +535,14 @@ var ScenePlugin = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Sends a Scene to the back of the Scenes list.
|
||||
*
|
||||
* This means it will render below all other Scenes.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#sendToBack
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to move.
|
||||
*
|
||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||
*/
|
||||
|
@ -547,14 +556,14 @@ var ScenePlugin = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Retrieve a Scene.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#get
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string} key - [description]
|
||||
* @param {string} key - The Scene to retrieve.
|
||||
*
|
||||
* @return {Phaser.Scene} [description]
|
||||
* @return {Phaser.Scene} The Scene.
|
||||
*/
|
||||
get: function (key)
|
||||
{
|
||||
|
@ -562,7 +571,7 @@ var ScenePlugin = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Shut down the given Scene.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#shutdown
|
||||
* @since 3.0.0
|
||||
|
@ -573,7 +582,7 @@ var ScenePlugin = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Destroy the given Scene.
|
||||
*
|
||||
* @method Phaser.Scenes.ScenePlugin#destroy
|
||||
* @since 3.0.0
|
||||
|
|
Loading…
Reference in a new issue