door (20)

This commit is contained in:
2024-10-20 14:52:24 +02:00
parent 704f2dfd2c
commit eb93c527d3
54 changed files with 2605 additions and 174 deletions

View File

@@ -5,6 +5,9 @@ public partial class Principal : Control
{
[Export] Panel sub;
[Export] Panel credit;
[Export] AnimationPlayer anim;
bool play_pressed = false;
bool enter = false;
Node parent;
@@ -12,6 +15,7 @@ public partial class Principal : Control
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
GetTree().Paused = false;
parent = GetParent();
sub.Visible = false;
}
@@ -19,6 +23,16 @@ public partial class Principal : Control
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
if(play_pressed && Input.IsActionJustPressed("valid") && !enter)
{
enter = true;
anim.Play("play2");
}else if (enter && Input.IsActionJustPressed("valid"))
{
//GetTree().Paused = false;
parent.Call("ToCityFunc");
}
}
public void EnterPressed()
@@ -40,9 +54,13 @@ public partial class Principal : Control
public void PlayPressed()
{
parent.Call("ToCityFunc");
//EmitSignal("ToCityEventHandler");
//GetTree().ChangeSceneToPacked(play);
if (!play_pressed)
{
play_pressed = true;
anim.Play("play");
}
//parent.Call("ToCityFunc");
}
public void ExitGlobPressed()