mirror of
https://github.com/photonstorm/phaser
synced 2024-12-26 04:53:38 +00:00
Scene types now can be an array of unions
`SettingsConfig | CreateSceneFromObjectConfig` is a valid scene type. Now it will be allowed in GameConfig.
This commit is contained in:
parent
4db20ffa9e
commit
7ab2f762b6
1 changed files with 5 additions and 3 deletions
8
types/phaser.d.ts
vendored
8
types/phaser.d.ts
vendored
|
@ -12,6 +12,8 @@ declare type EachContainerCallback<I> = (item: any, ...args: any[])=>void;
|
|||
|
||||
declare type LightForEach = (light: Phaser.GameObjects.Light)=>void;
|
||||
|
||||
declare type SceneType = Phaser.Scene | Phaser.Types.Scenes.SettingsConfig | Phaser.Types.Scenes.CreateSceneFromObjectConfig | Function;
|
||||
|
||||
/**
|
||||
* A custom function that will be responsible for wrapping the text.
|
||||
*/
|
||||
|
@ -61583,7 +61585,7 @@ declare namespace Phaser {
|
|||
/**
|
||||
* 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`.
|
||||
*/
|
||||
scene?: Phaser.Scene | Phaser.Scene[] | Phaser.Types.Scenes.SettingsConfig | Phaser.Types.Scenes.SettingsConfig[] | Phaser.Types.Scenes.CreateSceneFromObjectConfig | Phaser.Types.Scenes.CreateSceneFromObjectConfig[] | Function | Function[];
|
||||
scene?: SceneType | SceneType[];
|
||||
/**
|
||||
* Seed for the random number generator.
|
||||
*/
|
||||
|
@ -87818,7 +87820,7 @@ declare namespace Phaser {
|
|||
* @param autoStart If `true` the Scene will be started immediately after being added. Default false.
|
||||
* @param data Optional data object. This will be set as `Scene.settings.data` and passed to `Scene.init`, and `Scene.create`.
|
||||
*/
|
||||
add(key: string, sceneConfig: Phaser.Scene | Phaser.Types.Scenes.SettingsConfig | Phaser.Types.Scenes.CreateSceneFromObjectConfig | Function, autoStart?: boolean, data?: object): Phaser.Scene | null;
|
||||
add(key: string, sceneConfig: SceneType, autoStart?: boolean, data?: object): Phaser.Scene | null;
|
||||
|
||||
/**
|
||||
* Removes a Scene from the SceneManager.
|
||||
|
@ -88138,7 +88140,7 @@ declare namespace Phaser {
|
|||
* @param autoStart If `true` the Scene will be started immediately after being added. Default false.
|
||||
* @param data Optional data object. This will be set as `Scene.settings.data` and passed to `Scene.init`, and `Scene.create`.
|
||||
*/
|
||||
add(key: string, sceneConfig: Phaser.Scene | Phaser.Types.Scenes.SettingsConfig | Phaser.Types.Scenes.CreateSceneFromObjectConfig | Function, autoStart?: boolean, data?: object): Phaser.Scene | null;
|
||||
add(key: string, sceneConfig: SceneType, autoStart?: boolean, data?: object): Phaser.Scene | null;
|
||||
|
||||
/**
|
||||
* Launch the given Scene and run it in parallel with this one.
|
||||
|
|
Loading…
Reference in a new issue