Set spawn points

This commit is contained in:
2023-09-02 20:59:00 -07:00
parent 736060d6ca
commit 9b5a94bfab
12 changed files with 225 additions and 13 deletions

15
Scripts/AreaExit.cs Normal file
View File

@@ -0,0 +1,15 @@
using Godot;
public partial class AreaExit : Node3D
{
[Export]
private int _levelIndex;
private void OnExitEntered(Node3D node)
{
GD.Print("Exit reached");
var main = GetTree().Root.GetNode<Main>("/root/Main");
main.LoadNextLevel(_levelIndex);
}
}