removed useless function

This commit is contained in:
2023-03-17 10:01:06 +01:00
parent ca77ad3fc1
commit 6c71aa302c

View File

@@ -65,7 +65,17 @@ public partial class dialog_bubble : CanvasLayer
{
if (Visible)
ProcessMode = ProcessModeEnum.Inherit;
else ProcessMode = ProcessModeEnum.Disabled;
else if (richText != null)
{
dlgPointer = 0;
richText.VisibleCharacters = -1;
GetNode<Label>("box/name_label").Text = "???";
richText.Text = "";
if (GetParent().Name == "player") player.allowMovement = true;
isTalking = false;
forceClose = false;
ProcessMode = ProcessModeEnum.Disabled;
}
}
public override void _Process(double delta)
{
@@ -96,8 +106,7 @@ public partial class dialog_bubble : CanvasLayer
}
dlgPointer++;
}
if (dlgPointer > dlgLines.AsGodotArray().Count || forceClose)
CloseDialog();
Visible = !(dlgPointer > dlgLines.AsGodotArray().Count || forceClose);
}
public void UpdateDialog()
{
@@ -158,16 +167,4 @@ public partial class dialog_bubble : CanvasLayer
break;
}
}
public void CloseDialog()
{
Visible = false;
dlgPointer = 0;
richText.VisibleCharacters = -1;
GetNode<Label>("box/name_label").Text = "???";
richText.Text = "";
if (GetParent().Name == "player") player.allowMovement = true;
isTalking = false;
forceClose = false;
}
}