You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/core/typedefs/GameConfig.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
* @property {HTMLCanvasElement} [canvas=null] - Provide your own Canvas element for Phaser to use instead of creating one.
12
12
* @property {string} [canvasStyle=null] - CSS styles to apply to the game canvas instead of Phaser's default styles.
13
13
* @property {CanvasRenderingContext2D} [context] - Provide your own Canvas Context for Phaser to use, instead of creating one.
14
-
* @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 }.
14
+
* @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}.
15
15
* @property {string[]} [seed] - Seed for the random number generator.
16
16
* @property {string} [title=''] - The title of the game. Shown in the browser console.
17
17
* @property {string} [url='http://phaser.io'] - The URL of the game. Shown in the browser console.
Copy file name to clipboardExpand all lines: src/scene/Scene.js
+13-7Lines changed: 13 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -269,9 +269,9 @@ var Scene = new Class({
269
269
270
270
/**
271
271
* Should be overridden by your own Scenes.
272
+
* This method is called once per game step while the scene is running.
272
273
*
273
274
* @method Phaser.Scene#update
274
-
* @override
275
275
* @since 3.0.0
276
276
*
277
277
* @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
@@ -282,27 +282,33 @@ var Scene = new Class({
282
282
}
283
283
284
284
/**
285
-
* Should be overridden by your own Scenes.
285
+
* Can be defined on your own Scenes.
286
+
* This method is called by the Scene Manager when the scene starts, before `preload()` and `create()`.
286
287
*
287
288
* @method Phaser.Scene#init
288
-
* @override
289
289
* @since 3.0.0
290
+
*
291
+
* @param {object} data - Any data passed via `ScenePlugin.add()` or `ScenePlugin.start()`. Same as Scene.settings.data.
290
292
*/
291
293
292
294
/**
293
-
* Should be overridden by your own Scenes.
295
+
* Can be defined on your own Scenes. Use it to load assets.
296
+
* This method is called by the Scene Manager, after `init()` and before `create()`, only if the Scene has a LoaderPlugin.
297
+
* After this method completes, if the LoaderPlugin's queue isn't empty, the LoaderPlugin will start automatically.
294
298
*
295
299
* @method Phaser.Scene#preload
296
-
* @override
297
300
* @since 3.0.0
298
301
*/
299
302
300
303
/**
301
-
* Should be overridden by your own Scenes.
304
+
* Can be defined on your own Scenes. Use it to create your game objects.
305
+
* This method is called by the Scene Manager when the scene starts, after `init()` and `preload()`.
306
+
* If the LoaderPlugin started after `preload()`, then this method is called only after loading is complete.
302
307
*
303
308
* @method Phaser.Scene#create
304
-
* @override
305
309
* @since 3.0.0
310
+
*
311
+
* @param {object} data - Any data passed via `ScenePlugin.add()` or `ScenePlugin.start()`. Same as Scene.settings.data.
Copy file name to clipboardExpand all lines: src/scene/SceneManager.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -312,7 +312,7 @@ var SceneManager = new Class({
312
312
* @since 3.0.0
313
313
*
314
314
* @param {string} key - A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`.
315
-
* @param {(Phaser.Scene|Phaser.Scenes.Types.SettingsConfig|function)} sceneConfig - The config for the Scene
315
+
* @param {(Phaser.Scene|Phaser.Scenes.Types.SettingsConfig|Phaser.Scenes.Types.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene
316
316
* @param {boolean} [autoStart=false] - If `true` the Scene will be started immediately after being added.
317
317
* @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.
318
318
*
@@ -710,7 +710,7 @@ var SceneManager = new Class({
710
710
* @since 3.0.0
711
711
*
712
712
* @param {string} key - The key of the Scene.
713
-
* @param {(string|Phaser.Scenes.Types.SettingsConfig)} sceneConfig - The Scene config.
713
+
* @param {(string|Phaser.Scenes.Types.SettingsConfig|Phaser.Scenes.Types.CreateSceneFromObjectConfig)} sceneConfig - The Scene config.
Copy file name to clipboardExpand all lines: src/scene/ScenePlugin.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -430,7 +430,7 @@ var ScenePlugin = new Class({
430
430
* @since 3.0.0
431
431
*
432
432
* @param {string} key - The Scene key.
433
-
* @param {(Phaser.Scene|Phaser.Scenes.Types.SettingsConfig|function)} sceneConfig - The config for the Scene.
433
+
* @param {(Phaser.Scene|Phaser.Scenes.Types.SettingsConfig|Phaser.Scenes.Types.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene.
434
434
* @param {boolean} autoStart - Whether to start the Scene after it's added.
435
435
* @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.
0 commit comments