-
Notifications
You must be signed in to change notification settings - Fork 7.1k
inactive scene is updated after transition complete #5550
Copy link
Copy link
Closed
Labels
Description
Version
- Phaser Version:
3.52.0 - Operating system:
ubuntu 18.04 - Browser:
chrome
Description
Hi,
I tried to use scene Transition and I found inactive scene was updated after shutdown (only once).
I’m not familiar with Phaser, system.sceneUpdate.call seems to be called after scenePlugin.transitionComplete.
// Scene.System
step: function (time, delta)
{
var events = this.events;
events.emit(Events.PRE_UPDATE, time, delta);
// 'scenePlugin.transitionComplete' is called and scene will be inactive
events.emit(Events.UPDATE, time, delta);
// update inactive scene
this.sceneUpdate.call(this.scene, time, delta);
events.emit(Events.POST_UPDATE, time, delta);
},Example Test Code
Transition was started as following…
// from : scene.system.settings{active: true, status: 5 ...}
// to : scene.system.settings{active: false, status: 1 ...}
this.scene.transition({
target: 'anotherScene',
duration: 2000,
remove: false,
allowInput: false,
onUpdate: (progress: number]) => {
console.log(`transition: ${progress}`);
}
});Reactions are currently unavailable