v1.1
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user