Load level
This commit is contained in:
@@ -29,9 +29,8 @@ public partial class MainMenu : Node2D
|
||||
{
|
||||
if (animationName == "FirstLevel")
|
||||
{
|
||||
var main = GetTree().Root.GetNode<Main>("Main");
|
||||
var firstLevel = main.Levels.First().Instantiate();
|
||||
AddChild(firstLevel);
|
||||
var main = GetTree().Root.GetNode<Main>("/root/Main");
|
||||
main.LoadLevel(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user