mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 15:41:37 +00:00
Merge pull request #6238 from ubershmekel/master
Introduce `SceneType` for ease and correctness
This commit is contained in:
commit
4346113fee
5 changed files with 8 additions and 4 deletions
|
@ -46,7 +46,7 @@ export class Parser {
|
|||
|
||||
let ignored = [];
|
||||
|
||||
let result = '/// <reference types="./matter" />\n\n';
|
||||
let result = '// DO NOT EDIT THIS FILE! It was generated by running `npm run tsgen`\n/// <reference types="./matter" />\n\n';
|
||||
|
||||
result = result.concat(this.topLevel.reduce((out: string, obj: dom.TopLevelDeclaration) => {
|
||||
return out + dom.emit(obj);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* @property {string} [canvasStyle=null] - CSS styles to apply to the game canvas instead of Phasers default styles.
|
||||
* @property {boolean}[customEnvironment=false] - Is Phaser running under a custom (non-native web) environment? If so, set this to `true` to skip internal Feature detection. If `true` the `renderType` cannot be left as `AUTO`.
|
||||
* @property {CanvasRenderingContext2D} [context] - Provide your own Canvas Context for Phaser to use, instead of creating one.
|
||||
* @property {(Phaser.Scene|Phaser.Scene[]|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.SettingsConfig[]|Phaser.Types.Scenes.CreateSceneFromObjectConfig|Phaser.Types.Scenes.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 `Phaser.Scenes.SceneManager#add`.
|
||||
* @property {(Phaser.Types.Scenes.SceneType|Phaser.Types.Scenes.SceneType[])} [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 `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='https://phaser.io'] - The URL of the game. Shown in the browser console.
|
||||
|
|
|
@ -333,7 +333,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.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene
|
||||
* @param {(Phaser.Types.Scenes.SceneType)} 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`, and `Scene.create`.
|
||||
*
|
||||
|
|
|
@ -456,7 +456,7 @@ var ScenePlugin = 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.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene
|
||||
* @param {(Phaser.Types.Scenes.SceneType)} 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`, and `Scene.create`.
|
||||
*
|
||||
|
|
4
src/scene/typedefs/SceneType.js
Normal file
4
src/scene/typedefs/SceneType.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* @typedef {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function)} Phaser.Types.Scenes.SceneType
|
||||
* @since 3.60.0
|
||||
*/
|
Loading…
Reference in a new issue