allow making demo flxDirector for options menu
This commit is contained in:
@@ -37,7 +37,9 @@
|
||||
(set pauseMenu.onClose ->:Void (FlxG.switchState (new MenuState)))}
|
||||
(movie.run)))
|
||||
|
||||
(defNew []
|
||||
// MenuState uses a director instance to demo the volume. This shouldn't affect flixel globals i.e. by adding an actionManager or sprite layers
|
||||
(defNew [&opt :Bool demoDirector]
|
||||
(unless demoDirector
|
||||
// Continue action requires fresh input, Fast Forward action supports continuous holding down
|
||||
(set continueAction (new FlxActionDigital "Continue" onContinue))
|
||||
(set fastForwardAction (new FlxActionDigital "Fast Forward"))
|
||||
@@ -59,7 +61,7 @@
|
||||
(doFor i (range (+ 1 LAYER_MAX))
|
||||
(let [g (new FlxTypedGroup<FlxSprite>)]
|
||||
(spriteLayers.push g)
|
||||
(FlxG.state.add g))))
|
||||
(FlxG.state.add g)))))
|
||||
|
||||
(prop :Map<SceneTime,FlxSprite> skySprites (new Map))
|
||||
(prop &mut :FlxSprite skySprite)
|
||||
|
Reference in New Issue
Block a user