This commit is contained in:
2024-10-28 21:53:03 +01:00
parent 9945adfdaf
commit 0975816356
3 changed files with 87 additions and 15 deletions

View File

@@ -8,6 +8,7 @@ public partial class Principal : Control
[Export] AnimationPlayer anim;
bool play_pressed = false;
bool enter = false;
bool touch = false;
Node parent;
@@ -18,8 +19,8 @@ public partial class Principal : Control
GetTree().Paused = false;
parent = GetParent();
sub.Visible = false;
}
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
@@ -28,12 +29,17 @@ public partial class Principal : Control
{
enter = true;
anim.Play("play2");
}else if (enter && Input.IsActionJustPressed("valid"))
}else if (enter && Input.IsActionJustPressed("valid") && ! touch)
{
touch = true;
anim.Play("play3");
}else if (touch && Input.IsActionJustPressed("valid"))
{
Input.MouseMode = Input.MouseModeEnum.Hidden;
parent.Call("ToCityFunc");
}
}