mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Merge pull request #3349 from migiyubi/make-scene-restartable
Make scene restartable
This commit is contained in:
commit
40818ba57b
1 changed files with 8 additions and 11 deletions
|
@ -105,18 +105,15 @@ var ScenePlugin = new Class({
|
|||
{
|
||||
if (key === undefined) { key = this.key; }
|
||||
|
||||
if (key !== this.key)
|
||||
if (this.settings.status !== CONST.RUNNING)
|
||||
{
|
||||
if (this.settings.status !== CONST.RUNNING)
|
||||
{
|
||||
this.manager.queueOp('stop', this.key);
|
||||
this.manager.queueOp('start', key);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.manager.stop(this.key);
|
||||
this.manager.start(key, data);
|
||||
}
|
||||
this.manager.queueOp('stop', this.key);
|
||||
this.manager.queueOp('start', key);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.manager.stop(this.key);
|
||||
this.manager.start(key, data);
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
Loading…
Add table
Reference in a new issue