scene manager
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user