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/scene/events/TRANSITION_COMPLETE_EVENT.js
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,21 @@
7
7
/**
8
8
* The Scene Transition Complete Event.
9
9
*
10
-
* This event is dispatched by a Scene when the Scene Transition process completes.
10
+
* This event is dispatched by the Target Scene of a transition.
11
+
*
12
+
* It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration
13
+
* of the transition.
11
14
*
12
15
* Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.
13
16
*
17
+
* The Scene Transition event flow is as follows:
18
+
*
19
+
* 1) [TRANSITION_OUT]{Phaser.Scenes.Events#TRANSITION_OUT} - the Scene that started the transition will emit this event.
20
+
* 2) [TRANSITION_INIT]{Phaser.Scenes.Events#TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
21
+
* 3a) [TRANSITION_START]{Phaser.Scenes.Events#TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
22
+
* 3b) [TRANSITION_WAKE]{Phaser.Scenes.Events#TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
23
+
* 4) [TRANSITION_COMPLETE]{Phaser.Scenes.Events#TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
24
+
*
14
25
* @event Phaser.Scenes.Events#TRANSITION_COMPLETE
15
26
*
16
27
* @param {Phaser.Scene} scene -The Scene on which the transitioned completed.
Copy file name to clipboardExpand all lines: src/scene/events/TRANSITION_INIT_EVENT.js
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,21 @@
7
7
/**
8
8
* The Scene Transition Init Event.
9
9
*
10
-
* This event is dispatched by a Scene during the Scene Transition process.
10
+
* This event is dispatched by the Target Scene of a transition.
11
+
*
12
+
* It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,
13
+
* this event is not dispatched.
11
14
*
12
15
* Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.
13
16
*
17
+
* The Scene Transition event flow is as follows:
18
+
*
19
+
* 1) [TRANSITION_OUT]{Phaser.Scenes.Events#TRANSITION_OUT} - the Scene that started the transition will emit this event.
20
+
* 2) [TRANSITION_INIT]{Phaser.Scenes.Events#TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
21
+
* 3a) [TRANSITION_START]{Phaser.Scenes.Events#TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
22
+
* 3b) [TRANSITION_WAKE]{Phaser.Scenes.Events#TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
23
+
* 4) [TRANSITION_COMPLETE]{Phaser.Scenes.Events#TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
24
+
*
14
25
* @event Phaser.Scenes.Events#TRANSITION_INIT
15
26
*
16
27
* @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.
* This event is dispatched by a Scene when it initiates a transition to another Scene.
11
+
*
12
+
* Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.
13
+
*
14
+
* The Scene Transition event flow is as follows:
15
+
*
16
+
* 1) [TRANSITION_OUT]{Phaser.Scenes.Events#TRANSITION_OUT} - the Scene that started the transition will emit this event.
17
+
* 2) [TRANSITION_INIT]{Phaser.Scenes.Events#TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
18
+
* 3a) [TRANSITION_START]{Phaser.Scenes.Events#TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
19
+
* 3b) [TRANSITION_WAKE]{Phaser.Scenes.Events#TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
20
+
* 4) [TRANSITION_COMPLETE]{Phaser.Scenes.Events#TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
21
+
*
22
+
* @event Phaser.Scenes.Events#TRANSITION_OUT
23
+
*
24
+
* @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.
25
+
* @param {number} duration - The duration of the transition in ms.
Copy file name to clipboardExpand all lines: src/scene/events/TRANSITION_START_EVENT.js
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,24 @@
7
7
/**
8
8
* The Scene Transition Start Event.
9
9
*
10
-
* This event is dispatched by a Scene during the Scene Transition process.
10
+
* This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.
11
+
*
12
+
* It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,
13
+
* this event is dispatched anyway.
14
+
*
15
+
* If the Target Scene was sleeping then the [TRANSITION_WAKE]{Phaser.Scenes.Events#TRANSITION_WAKE} event is
16
+
* dispatched instead of this event.
11
17
*
12
18
* Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.
13
19
*
20
+
* The Scene Transition event flow is as follows:
21
+
*
22
+
* 1) [TRANSITION_OUT]{Phaser.Scenes.Events#TRANSITION_OUT} - the Scene that started the transition will emit this event.
23
+
* 2) [TRANSITION_INIT]{Phaser.Scenes.Events#TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
24
+
* 3a) [TRANSITION_START]{Phaser.Scenes.Events#TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
25
+
* 3b) [TRANSITION_WAKE]{Phaser.Scenes.Events#TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
26
+
* 4) [TRANSITION_COMPLETE]{Phaser.Scenes.Events#TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
27
+
*
14
28
* @event Phaser.Scenes.Events#TRANSITION_START
15
29
*
16
30
* @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.
* This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before
11
+
* the transition began. If the Scene was not asleep the [TRANSITION_START]{Phaser.Scenes.Events#TRANSITION_START} event is dispatched instead.
12
+
*
13
+
* Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.
14
+
*
15
+
* The Scene Transition event flow is as follows:
16
+
*
17
+
* 1) [TRANSITION_OUT]{Phaser.Scenes.Events#TRANSITION_OUT} - the Scene that started the transition will emit this event.
18
+
* 2) [TRANSITION_INIT]{Phaser.Scenes.Events#TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
19
+
* 3a) [TRANSITION_START]{Phaser.Scenes.Events#TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
20
+
* 3b) [TRANSITION_WAKE]{Phaser.Scenes.Events#TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
21
+
* 4) [TRANSITION_COMPLETE]{Phaser.Scenes.Events#TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
22
+
*
23
+
* @event Phaser.Scenes.Events#TRANSITION_WAKE
24
+
*
25
+
* @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.
26
+
* @param {number} duration - The duration of the transition in ms.
0 commit comments