scene manager
This commit is contained in:
@@ -6,10 +6,13 @@ public partial class Menu : Control
|
||||
[Export] AnimationPlayer anim;
|
||||
[Export] Panel pause;
|
||||
[Export] Panel trick;
|
||||
[Export] PackedScene principal;
|
||||
[Export] CharacterBody2D player;
|
||||
Node parent;
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
parent = player.GetParent().GetParent();
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
@@ -32,7 +35,10 @@ public partial class Menu : Control
|
||||
|
||||
public void ExitDown()
|
||||
{
|
||||
GetTree().ChangeSceneToPacked(principal);
|
||||
GetTree().Paused = false;
|
||||
parent.Call("ToPrincipalFunc");
|
||||
//EmitSignal("ToPrincipalEventHandler");
|
||||
//GetTree().ChangeSceneToPacked(principal);
|
||||
}
|
||||
|
||||
public void Res()
|
||||
|
||||
Reference in New Issue
Block a user