Fixed bug at the start of the dialogue
This commit is contained in:
parent
17fa98004c
commit
b8139d5c7f
|
@ -33,6 +33,8 @@ class DialogueBox extends FlxSpriteGroup
|
|||
|
||||
var handSelect:FlxSprite;
|
||||
var bgFade:FlxSprite;
|
||||
|
||||
var firstDialogue:Bool = true;
|
||||
|
||||
public function new(talkingRight:Bool = true, ?dialogueList:Array<String>)
|
||||
{
|
||||
|
@ -171,13 +173,13 @@ class DialogueBox extends FlxSpriteGroup
|
|||
dialogueStarted = true;
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.ANY)
|
||||
if (FlxG.keys.justPressed.ANY && dialogueStarted == true)
|
||||
{
|
||||
remove(dialogue);
|
||||
|
||||
|
||||
FlxG.sound.play('assets/sounds/clickText' + TitleState.soundExt, 0.8);
|
||||
|
||||
if (dialogueList[1] == null)
|
||||
if (dialogueList[1] == null && dialogueList[0] != null)
|
||||
{
|
||||
if (!isEnding)
|
||||
{
|
||||
|
@ -209,7 +211,7 @@ class DialogueBox extends FlxSpriteGroup
|
|||
startDialogue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
super.update(elapsed);
|
||||
}
|
||||
|
||||
|
@ -218,7 +220,6 @@ class DialogueBox extends FlxSpriteGroup
|
|||
function startDialogue():Void
|
||||
{
|
||||
cleanDialog();
|
||||
|
||||
// var theDialog:Alphabet = new Alphabet(0, 70, dialogueList[0], false, true);
|
||||
// dialogue = theDialog;
|
||||
// add(theDialog);
|
||||
|
|
Loading…
Reference in New Issue