Destroy the characters before setting the new text

This commit is contained in:
Sword352
2023-07-04 08:34:03 +02:00
committed by GitHub
parent e123fa06f7
commit 280d14056e
+7
View File
@@ -53,6 +53,13 @@ class Alphabet extends FlxSpriteGroup
private function set_text(v:String):String {
text = v;
while (members.length > 0) {
var character = members[0];
remove(character, true);
character.destroy();
}
if (text != "") {
if (typed)
startTypedText();