[fix] sceneManager run will queueOp if scene not ready

fixed linting
This commit is contained in:
rook2pawn 2018-06-13 15:35:25 -07:00
parent 734c0115f9
commit c09b4baf16

View file

@ -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;
}