scene manager

This commit is contained in:
2024-10-19 22:42:43 +02:00
parent c0304fdadd
commit cda6d33582
14 changed files with 275 additions and 14 deletions

View File

@@ -5,12 +5,14 @@ public partial class Principal : Control
{
[Export] Panel sub;
[Export] Panel credit;
[Export] PackedScene play;
Node parent;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
parent = GetParent();
sub.Visible = false;
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
@@ -20,6 +22,7 @@ public partial class Principal : Control
public void EnterPressed()
{
GD.Print("wefwef");
sub.Visible = true;
}
@@ -37,7 +40,9 @@ public partial class Principal : Control
public void PlayPressed()
{
GetTree().ChangeSceneToPacked(play);
parent.Call("ToCityFunc");
//EmitSignal("ToCityEventHandler");
//GetTree().ChangeSceneToPacked(play);
}
public void ExitGlobPressed()