literally half of the game

This commit is contained in:
Sylvia 2026-08-27 04:07:01 -07:00
parent 1590b5faa6
commit b842289076
77 changed files with 11904 additions and 72 deletions

View file

@ -0,0 +1,37 @@
using UnityEngine;
using UnityEngine.SceneManagement;
public class LevelSwitcher : MonoBehaviour
{
#region Statication
public static LevelSwitcher instance;
private void Awake()
{
if (instance != null && instance != this)
{
Destroy(gameObject);
return;
}
DontDestroyOnLoad(this);
instance = this;
}
#endregion
[SerializeField] private int mapSceneIndex;
public void LoadMap(Map requestedMap, int exitIndex)
{
SceneManager.LoadScene(mapSceneIndex);
Map newMap = Instantiate(requestedMap);
newMap.Load();
//load player and set to exit position
}
public void SwitchMenu(int sceneIndex)
{
SceneManager.LoadScene(sceneIndex);
}
}