fix crash bug when canceling the resume prompt
This commit is contained in:
@@ -30,11 +30,15 @@
|
||||
("Scene Selection"
|
||||
(sceneSelection
|
||||
->:Void {
|
||||
(movie.doCleanup)
|
||||
(FlxG.switchState (new MenuState))
|
||||
}))
|
||||
("Start From Beginning" (movie.run))
|
||||
(never otherwise)) true "escape")
|
||||
(set pauseMenu.onClose ->:Void (FlxG.switchState (new MenuState)))}
|
||||
(set pauseMenu.onClose ->:Void {
|
||||
(movie.doCleanup)
|
||||
(FlxG.switchState (new MenuState))
|
||||
})}
|
||||
(movie.run)))
|
||||
|
||||
// MenuState uses a director instance to demo the volume. This shouldn't affect flixel globals i.e. by adding an actionManager or sprite layers
|
||||
|
@@ -853,9 +853,10 @@
|
||||
(destroyAndClear sounds)
|
||||
(destroyAndClear voiceTracks)
|
||||
(destroyAndClear songs)
|
||||
(let [currentCamera .camera (_currentScene)]
|
||||
(when (flixel.FlxG.cameras.list.contains currentCamera)
|
||||
(flixel.FlxG.cameras.remove currentCamera true)))
|
||||
(when sceneKey
|
||||
(let [currentCamera .camera (_currentScene)]
|
||||
(when (flixel.FlxG.cameras.list.contains currentCamera)
|
||||
(flixel.FlxG.cameras.remove currentCamera true))))
|
||||
(when (flixel.FlxG.cameras.list.contains uiCamera)
|
||||
(flixel.FlxG.cameras.remove uiCamera true))
|
||||
(set kiss_flixel.SimpleWindow.defaultCamera FlxG.camera)
|
||||
|
Reference in New Issue
Block a user