Add Phaser.Scenes.Types.CreateSceneFromObjectConfig

This commit is contained in:
samme 2019-04-10 12:43:44 -07:00
parent 698fc7d522
commit f9797d0ed0
4 changed files with 15 additions and 4 deletions

View file

@ -11,7 +11,7 @@
* @property {HTMLCanvasElement} [canvas=null] - Provide your own Canvas element for Phaser to use instead of creating one.
* @property {string} [canvasStyle=null] - CSS styles to apply to the game canvas instead of Phaser's default styles.
* @property {CanvasRenderingContext2D} [context] - Provide your own Canvas Context for Phaser to use, instead of creating one.
* @property {object} [scene=null] - A scene or scenes to add to the game. If several are given, the first is started; the remainder are started only if they have { active: true }.
* @property {(Phaser.Scene|Phaser.Scene[]|Phaser.Scenes.Types.SettingsConfig|Phaser.Scenes.Types.SettingsConfig[]|Phaser.Scenes.Types.CreateSceneFromObjectConfig|Phaser.Scenes.Types.CreateSceneFromObjectConfig[]|function|function[])} [scene=null] - A scene or scenes to add to the game. If several are given, the first is started; the remainder are started only if they have `{ active: true }`. See the `sceneConfig` argument in {@link Phaser.Scenes.SceneManager#add}.
* @property {string[]} [seed] - Seed for the random number generator.
* @property {string} [title=''] - The title of the game. Shown in the browser console.
* @property {string} [url='http://phaser.io'] - The URL of the game. Shown in the browser console.

View file

@ -312,7 +312,7 @@ var SceneManager = new Class({
* @since 3.0.0
*
* @param {string} key - A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`.
* @param {(Phaser.Scene|Phaser.Scenes.Types.SettingsConfig|function)} sceneConfig - The config for the Scene
* @param {(Phaser.Scene|Phaser.Scenes.Types.SettingsConfig|Phaser.Scenes.Types.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene
* @param {boolean} [autoStart=false] - If `true` the Scene will be started immediately after being added.
* @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.
*
@ -710,7 +710,7 @@ var SceneManager = new Class({
* @since 3.0.0
*
* @param {string} key - The key of the Scene.
* @param {(string|Phaser.Scenes.Types.SettingsConfig)} sceneConfig - The Scene config.
* @param {(string|Phaser.Scenes.Types.SettingsConfig|Phaser.Scenes.Types.CreateSceneFromObjectConfig)} sceneConfig - The Scene config.
*
* @return {Phaser.Scene} The created Scene.
*/

View file

@ -430,7 +430,7 @@ var ScenePlugin = new Class({
* @since 3.0.0
*
* @param {string} key - The Scene key.
* @param {(Phaser.Scene|Phaser.Scenes.Types.SettingsConfig|function)} sceneConfig - The config for the Scene.
* @param {(Phaser.Scene|Phaser.Scenes.Types.SettingsConfig|Phaser.Scenes.Types.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene.
* @param {boolean} autoStart - Whether to start the Scene after it's added.
* @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.
*

View file

@ -0,0 +1,11 @@
/**
* @typedef {object} Phaser.Scenes.Types.CreateSceneFromObjectConfig
* @since 3.17.0
*
* @property {function} [init] - See {@link Phaser.Scene#init}.
* @property {function} [preload] - See See {@link Phaser.Scene#preload}.
* @property {function} [create] - See {@link Phaser.Scene#create}.
* @property {function} [update] - See {@link Phaser.Scene#update}.
* @property {any} [extend] - Any additional properties, which will be copied to the Scene after it's created (except `data` or `sys`).
* @property {any} [extend.data] - Any values, which will be merged into the Scene's Data Manager store.
*/