pause and resume animations
This commit is contained in:
@@ -31,6 +31,13 @@
|
|||||||
|
|
||||||
(method :Void pause []
|
(method :Void pause []
|
||||||
(FlxG.inputs.remove actionManager)
|
(FlxG.inputs.remove actionManager)
|
||||||
|
(FlxG.state.forEach
|
||||||
|
->:Void child
|
||||||
|
(typeCase [child]
|
||||||
|
([:FlxSprite sprite]
|
||||||
|
(sprite.animation?.pause))
|
||||||
|
(otherwise))
|
||||||
|
true)
|
||||||
(doFor sound currentSounds
|
(doFor sound currentSounds
|
||||||
(sound.pause))
|
(sound.pause))
|
||||||
(doFor track currentVoiceTracks
|
(doFor track currentVoiceTracks
|
||||||
@@ -46,6 +53,13 @@
|
|||||||
|
|
||||||
(method :Void resume []
|
(method :Void resume []
|
||||||
(FlxG.inputs.add actionManager)
|
(FlxG.inputs.add actionManager)
|
||||||
|
(FlxG.state.forEach
|
||||||
|
->:Void child
|
||||||
|
(typeCase [child]
|
||||||
|
([:FlxSprite sprite]
|
||||||
|
(sprite.animation?.resume))
|
||||||
|
(otherwise))
|
||||||
|
true)
|
||||||
(resumeAndUpdateCurrentVolume currentSounds soundVolume)
|
(resumeAndUpdateCurrentVolume currentSounds soundVolume)
|
||||||
(resumeAndUpdateCurrentVolume currentVoiceTracks voiceVolume)
|
(resumeAndUpdateCurrentVolume currentVoiceTracks voiceVolume)
|
||||||
(when music
|
(when music
|
||||||
|
|||||||
Reference in New Issue
Block a user