Load level
This commit is contained in:
11
Scripts/Level1.cs
Normal file
11
Scripts/Level1.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Godot;
|
||||
|
||||
public partial class Level1 : Node3D
|
||||
{
|
||||
private void OnExitEntered(Node3D node)
|
||||
{
|
||||
GD.Print("Exit reached");
|
||||
var main = GetTree().Root.GetNode<Main>("/root/Main");
|
||||
main.LoadNextLevel(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user