add scene transition

This commit is contained in:
2026-03-05 20:26:22 -06:00
parent 8a6338842a
commit 90430ef9c3
11 changed files with 6394 additions and 8 deletions
+32
View File
@@ -0,0 +1,32 @@
using System.Collections.Generic;
using UnityEngine;
// Manages scene-specific info, WILL be destroyed on load, and there is one of these
// in each scene
public class GameSceneManager : MonoBehaviour
{
public static GameSceneManager Instance { get; private set; }
// This is a list of doors that take us to different scenes. We'll use this
// to tell the GameManager which door to put us at when we enter a new scene.
public List<SceneDoor> SceneDoors;
public SceneDoor GetDoorWithId(int id)
{
return SceneDoors.Find(x => x.DoorId == id);
}
private void Awake()
{
// If there is an instance, and it's not me, delete myself.
if (Instance != null && Instance != this)
{
Destroy(this);
}
else
{
Instance = this;
}
}
}