File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import flixel.math.FlxMath;
1212import flixel .system .FlxAssets ;
1313import flixel .text .FlxText ;
1414import flixel .sound .FlxSound ;
15+ import flixel .util .FlxSignal ;
1516import flixel .math .FlxRandom ;
1617import openfl .media .Sound ;
1718
@@ -110,6 +111,8 @@ class FlxTypeText extends FlxText
110111 */
111112 public var eraseCallback : Void -> Void ;
112113
114+ public var onCharacterTyped (default , never ): FlxSignal = new FlxSignal ();
115+
113116 /**
114117 * The text that will ultimately be displayed.
115118 */
@@ -439,6 +442,8 @@ class FlxTypeText extends FlxText
439442 _length + = Std .int (_timer / delay );
440443 if (_length > _finalText .length )
441444 _length = _finalText .length ;
445+
446+ onCharacterTyped .dispatch ();
442447 }
443448
444449 if (_erasing && _timer >= eraseDelay )
@@ -516,6 +521,7 @@ class FlxTypeText extends FlxText
516521 if (_length >= _finalText .length && _typing && ! _waiting && ! _erasing )
517522 {
518523 onComplete ();
524+ onCharacterTyped .dispatch ();
519525 }
520526
521527 // If we're done erasing, call the onErased() function
You can’t perform that action at this time.
0 commit comments