Merge pull request #3409 from macbury/scene_key_exist

Remove scene key in SceneManager
This commit is contained in:
Richard Davey 2018-03-17 17:08:36 +00:00 committed by GitHub
commit 3537dce193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,7 +161,7 @@ var SceneManager = new Class({
// Replace key in case the scene changed it
key = newScene.sys.settings.key;
this.keys[key] = newScene;
this.scenes.push(newScene);
@ -356,7 +356,7 @@ var SceneManager = new Class({
if (index > -1)
{
this.keys[sceneKey] = undefined;
delete this.keys[sceneKey];
this.scenes.splice(index, 1);
if (this._start.indexOf(sceneKey) > -1)