mirror of
https://github.com/photonstorm/phaser
synced 2025-02-19 23:48:33 +00:00
[fix] sceneManager run will queueOp if scene not ready
fixed linting
This commit is contained in:
parent
734c0115f9
commit
c09b4baf16
1 changed files with 16 additions and 2 deletions
|
@ -140,7 +140,7 @@ var SceneManager = new Class({
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
game.events.once('ready', this.bootQueue, this);
|
||||
},
|
||||
|
||||
|
@ -1011,7 +1011,7 @@ var SceneManager = new Class({
|
|||
|
||||
/**
|
||||
* Runs the given Scene, but does not change the state of this Scene.
|
||||
*
|
||||
*
|
||||
* If the given Scene is paused, it will resume it. If sleeping, it will wake it.
|
||||
* If not running at all, it will be started.
|
||||
*
|
||||
|
@ -1032,6 +1032,20 @@ var SceneManager = new Class({
|
|||
|
||||
if (!scene)
|
||||
{
|
||||
var isFound = false;
|
||||
for (var i = 0; i < this._pending.length; i++)
|
||||
{
|
||||
if (this._pending[i].key === key)
|
||||
{
|
||||
isFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isFound)
|
||||
{
|
||||
this.queueOp('stop', key);
|
||||
this.queueOp('start', key, data);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue