destroy SceneFlxStates when a FlxMovie ends

This commit is contained in:
2021-12-21 16:37:38 -07:00
parent e1f2043ecc
commit fd4b989d17
5 changed files with 26 additions and 13 deletions

View File

@@ -9,6 +9,11 @@
(setSprite.loadGraphic (dictGet sets set))
(newScene name (cast (new SceneFlxState setSprite time perspective)))))
// Destroy substates when the movie end is reached:
(cleanup
(doFor =>name scene scenes
(.destroy (cast scene SceneFlxState))))
(method newFlxSound [name path &opt :Float volume]
(set volume (or volume 1))
(assert (<= 0 volume 1))