From 698fc7d5224f78a71838d0d427a19aa2a73898e4 Mon Sep 17 00:00:00 2001 From: samme Date: Wed, 10 Apr 2019 12:43:00 -0700 Subject: [PATCH] Docs for Scene methods Added descriptions and arguments. --- src/scene/Scene.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/scene/Scene.js b/src/scene/Scene.js index 7804d225c..6c314e984 100644 --- a/src/scene/Scene.js +++ b/src/scene/Scene.js @@ -269,9 +269,9 @@ var Scene = new Class({ /** * Should be overridden by your own Scenes. + * This method is called once per game step while the scene is running. * * @method Phaser.Scene#update - * @override * @since 3.0.0 * * @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({ } /** - * Should be overridden by your own Scenes. + * Can be defined on your own Scenes. + * This method is called by the Scene Manager when the scene starts, before `preload()` and `create()`. * * @method Phaser.Scene#init - * @override * @since 3.0.0 + * + * @param {object} data - Any data passed via `ScenePlugin.add()` or `ScenePlugin.start()`. Same as Scene.settings.data. */ /** - * Should be overridden by your own Scenes. + * Can be defined on your own Scenes. Use it to load assets. + * This method is called by the Scene Manager, after `init()` and before `create()`, only if the Scene has a LoaderPlugin. + * After this method completes, if the LoaderPlugin's queue isn't empty, the LoaderPlugin will start automatically. * * @method Phaser.Scene#preload - * @override * @since 3.0.0 */ /** - * Should be overridden by your own Scenes. + * Can be defined on your own Scenes. Use it to create your game objects. + * This method is called by the Scene Manager when the scene starts, after `init()` and `preload()`. + * If the LoaderPlugin started after `preload()`, then this method is called only after loading is complete. * * @method Phaser.Scene#create - * @override * @since 3.0.0 + * + * @param {object} data - Any data passed via `ScenePlugin.add()` or `ScenePlugin.start()`. Same as Scene.settings.data. */ });