pause and unpause FlxTypedTexts
This commit is contained in:
@@ -23,6 +23,7 @@ import hollywoo.HFloat;
|
||||
import hollywoo_flixel.FlxMovie;
|
||||
import flixel.util.FlxColor;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.addons.text.FlxTypeText;
|
||||
import flixel.system.FlxSound;
|
||||
import flixel.FlxCamera;
|
||||
import flixel.util.FlxTimer;
|
||||
|
@@ -78,6 +78,12 @@
|
||||
(FlxG.state.forEach
|
||||
->:Void child
|
||||
(typeCase [child]
|
||||
([:FlxTypeText typeText]
|
||||
(when typeText.sounds
|
||||
(doFor sound typeText.sounds
|
||||
(when sound.playing
|
||||
(sound.pause))))
|
||||
(set typeText.paused true))
|
||||
([:FlxSprite sprite]
|
||||
(sprite.animation?.pause))
|
||||
(otherwise))
|
||||
@@ -102,6 +108,11 @@
|
||||
(FlxG.state.forEach
|
||||
->:Void child
|
||||
(typeCase [child]
|
||||
([:FlxTypeText typeText]
|
||||
(when typeText.sounds
|
||||
(doFor sound typeText.sounds
|
||||
(when sound.playing (sound.resume))))
|
||||
(set typeText.paused false))
|
||||
([:FlxSprite sprite]
|
||||
(sprite.animation?.resume))
|
||||
(otherwise))
|
||||
|
Reference in New Issue
Block a user