add exit to scenemanager
This commit is contained in:
parent
29ace4909f
commit
f4161cb57d
|
@ -69,8 +69,10 @@ function SceneManager(p)
|
||||||
hasSetup : "setup" in oScene,
|
hasSetup : "setup" in oScene,
|
||||||
hasEnter : "enter" in oScene,
|
hasEnter : "enter" in oScene,
|
||||||
hasDraw : "draw" in oScene,
|
hasDraw : "draw" in oScene,
|
||||||
|
hasExit : "exit" in oScene,
|
||||||
setupExecuted : false,
|
setupExecuted : false,
|
||||||
enterExecuted : false };
|
enterExecuted : false
|
||||||
|
};
|
||||||
|
|
||||||
this.scenes.push(o);
|
this.scenes.push(o);
|
||||||
return o;
|
return o;
|
||||||
|
@ -118,6 +120,10 @@ function SceneManager(p)
|
||||||
// Re-arm the enter function at each show of the scene
|
// Re-arm the enter function at each show of the scene
|
||||||
o.enterExecuted = false;
|
o.enterExecuted = false;
|
||||||
|
|
||||||
|
if (this.scene && this.scene.hasExit) {
|
||||||
|
this.scene.oScene.exit();
|
||||||
|
}
|
||||||
|
|
||||||
this.scene = o;
|
this.scene = o;
|
||||||
|
|
||||||
// inject sceneArgs as a property of the scene
|
// inject sceneArgs as a property of the scene
|
||||||
|
|
Loading…
Reference in New Issue
Block a user