mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
ScenePlugin.start
and ScenePlugin.restart
will now always queue the op with the Scene Manager, regardless of the state of the Scene, in order to avoid issues where plugins carry on running for a frame before closing down. Fix #3776
This commit is contained in:
parent
b95f980023
commit
f1190529d2
3 changed files with 8 additions and 24 deletions
|
@ -39,6 +39,7 @@
|
|||
* Calling `Tween.play` on a tween created via `TweenManager.create` wouldn't actually start playback until the tween was first added to the Tween Manager. Now, calling `play` will have it automatically add itself to the Tween Manager if it's not already in there. Fix #3763 (thanks @pantoninho)
|
||||
* If the Blitter object has no Bob's to render it will now abort immediately, avoiding several context calls in Canvas mode.
|
||||
* `Scene.run` will now pass the optional `data` object in all cases, no matter if it's waking, resuming or starting a Scene (thanks @rook2pawn)
|
||||
* `ScenePlugin.start` and `ScenePlugin.restart` will now always queue the op with the Scene Manager, regardless of the state of the Scene, in order to avoid issues where plugins carry on running for a frame before closing down. Fix #3776 (thanks @jjalonso)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
@ -441,6 +441,8 @@ var SceneManager = new Class({
|
|||
{
|
||||
scene.init.call(scene, settings.data);
|
||||
|
||||
settings.status = CONST.INIT;
|
||||
|
||||
if (settings.isTransition)
|
||||
{
|
||||
sys.events.emit('transitioninit', settings.transitionFrom, settings.transitionDuration);
|
||||
|
@ -623,10 +625,7 @@ var SceneManager = new Class({
|
|||
sys.sceneUpdate = scene.update;
|
||||
}
|
||||
|
||||
if (settings.status === CONST.CREATING)
|
||||
{
|
||||
settings.status = CONST.RUNNING;
|
||||
}
|
||||
settings.status = CONST.RUNNING;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -200,16 +200,8 @@ var ScenePlugin = new Class({
|
|||
{
|
||||
if (key === undefined) { key = this.key; }
|
||||
|
||||
if (this.settings.status !== CONST.RUNNING)
|
||||
{
|
||||
this.manager.queueOp('stop', this.key);
|
||||
this.manager.queueOp('start', key, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.manager.stop(this.key);
|
||||
this.manager.start(key, data);
|
||||
}
|
||||
this.manager.queueOp('stop', this.key);
|
||||
this.manager.queueOp('start', key, data);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
@ -228,16 +220,8 @@ var ScenePlugin = new Class({
|
|||
{
|
||||
var key = this.key;
|
||||
|
||||
if (this.settings.status !== CONST.RUNNING)
|
||||
{
|
||||
this.manager.queueOp('stop', key);
|
||||
this.manager.queueOp('start', key, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.manager.stop(key);
|
||||
this.manager.start(key, data);
|
||||
}
|
||||
this.manager.queueOp('stop', key);
|
||||
this.manager.queueOp('start', key, data);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue