Skip to content

Commit b28f45b

Browse files
committed
Docs for Phaser.Scenes.ScenePlugin
- Note operations are queued - phaserjs#4403 (comment)
1 parent bee0a96 commit b28f45b

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

src/scene/ScenePlugin.js

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ var ScenePlugin = new Class({
188188
/**
189189
* Shutdown this Scene and run the given one.
190190
*
191+
* This will happen at the next Scene Manager update, not immediately.
192+
*
191193
* @method Phaser.Scenes.ScenePlugin#start
192194
* @since 3.0.0
193195
*
@@ -209,6 +211,8 @@ var ScenePlugin = new Class({
209211
/**
210212
* Restarts this Scene.
211213
*
214+
* This will happen at the next Scene Manager update, not immediately.
215+
*
212216
* @method Phaser.Scenes.ScenePlugin#restart
213217
* @since 3.4.0
214218
*
@@ -444,6 +448,8 @@ var ScenePlugin = new Class({
444448
/**
445449
* Launch the given Scene and run it in parallel with this one.
446450
*
451+
* This will happen at the next Scene Manager update, not immediately.
452+
*
447453
* @method Phaser.Scenes.ScenePlugin#launch
448454
* @since 3.0.0
449455
*
@@ -465,6 +471,8 @@ var ScenePlugin = new Class({
465471
/**
466472
* Runs the given Scene, but does not change the state of this Scene.
467473
*
474+
* This will happen at the next Scene Manager update, not immediately.
475+
*
468476
* If the given Scene is paused, it will resume it. If sleeping, it will wake it.
469477
* If not running at all, it will be started.
470478
*
@@ -492,6 +500,8 @@ var ScenePlugin = new Class({
492500
/**
493501
* Pause the Scene - this stops the update step from happening but it still renders.
494502
*
503+
* This will happen at the next Scene Manager update, not immediately.
504+
*
495505
* @method Phaser.Scenes.ScenePlugin#pause
496506
* @since 3.0.0
497507
*
@@ -512,6 +522,8 @@ var ScenePlugin = new Class({
512522
/**
513523
* Resume the Scene - starts the update loop again.
514524
*
525+
* This will happen at the next Scene Manager update, not immediately.
526+
*
515527
* @method Phaser.Scenes.ScenePlugin#resume
516528
* @since 3.0.0
517529
*
@@ -532,6 +544,8 @@ var ScenePlugin = new Class({
532544
/**
533545
* Makes the Scene sleep (no update, no render) but doesn't shutdown.
534546
*
547+
* This will happen at the next Scene Manager update, not immediately.
548+
*
535549
* @method Phaser.Scenes.ScenePlugin#sleep
536550
* @since 3.0.0
537551
*
@@ -552,6 +566,8 @@ var ScenePlugin = new Class({
552566
/**
553567
* Makes the Scene wake-up (starts update and render)
554568
*
569+
* This will happen at the next Scene Manager update, not immediately.
570+
*
555571
* @method Phaser.Scenes.ScenePlugin#wake
556572
* @since 3.0.0
557573
*
@@ -571,11 +587,8 @@ var ScenePlugin = new Class({
571587

572588
/**
573589
* Makes this Scene sleep then starts the Scene given.
574-
*
575-
* No checks are made to see if an instance of the given Scene is already running.
576-
* Because Scenes in Phaser are non-exclusive, you are allowed to run multiple
577-
* instances of them _at the same time_. This means, calling this function
578-
* may launch another instance of the requested Scene if it's already running.
590+
*
591+
* This will happen at the next Scene Manager update, not immediately.
579592
*
580593
* @method Phaser.Scenes.ScenePlugin#switch
581594
* @since 3.0.0
@@ -597,6 +610,8 @@ var ScenePlugin = new Class({
597610
/**
598611
* Shutdown the Scene, clearing display list, timers, etc.
599612
*
613+
* This happens at the next Scene Manager update, not immediately.
614+
*
600615
* @method Phaser.Scenes.ScenePlugin#stop
601616
* @since 3.0.0
602617
*
@@ -814,7 +829,7 @@ var ScenePlugin = new Class({
814829
* The Scene is removed from the local scenes array, it's key is cleared from the keys
815830
* cache and Scene.Systems.destroy is then called on it.
816831
*
817-
* If the SceneManager is processing the Scenes when this method is called it wil
832+
* If the SceneManager is processing the Scenes when this method is called it will
818833
* queue the operation for the next update sequence.
819834
*
820835
* @method Phaser.Scenes.ScenePlugin#remove

0 commit comments

Comments
 (0)