1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-27 01:03:35 +00:00

skip to end of dialogue if not finished

This commit is contained in:
MtH 2021-03-30 18:59:14 +02:00
parent 0370f77dfe
commit b7a76bdc8e

View file

@ -150,6 +150,7 @@ class DialogueBox extends FlxSpriteGroup
var dialogueOpened:Bool = false; var dialogueOpened:Bool = false;
var dialogueStarted:Bool = false; var dialogueStarted:Bool = false;
var dialogueEnded:Bool = false;
override function update(elapsed:Float) override function update(elapsed:Float)
{ {
@ -180,7 +181,7 @@ class DialogueBox extends FlxSpriteGroup
dialogueStarted = true; dialogueStarted = true;
} }
if (FlxG.keys.justPressed.ANY && dialogueStarted == true) if (FlxG.keys.justPressed.ANY && dialogueEnded)
{ {
remove(dialogue); remove(dialogue);
@ -219,6 +220,8 @@ class DialogueBox extends FlxSpriteGroup
startDialogue(); startDialogue();
} }
} }
else if (FlxG.keys.justPressed.ANY && dialogueStarted)
swagDialogue.skip();
super.update(elapsed); super.update(elapsed);
} }
@ -239,8 +242,10 @@ class DialogueBox extends FlxSpriteGroup
{ {
trace("dialogue finish"); trace("dialogue finish");
handSelect.visible = true; handSelect.visible = true;
dialogueEnded = true;
}; };
handSelect.visible = false; handSelect.visible = false;
dialogueEnded = false;
switch (curCharacter) switch (curCharacter)
{ {