lost me mind i did
This commit is contained in:
35
Assets/Scripts/SceneManagement/LevelChanger.cs
Normal file
35
Assets/Scripts/SceneManagement/LevelChanger.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Scampz.GameJam
|
||||
{
|
||||
public class LevelChanger : MonoBehaviour
|
||||
{
|
||||
public Animator animator;
|
||||
public int sceneIndex = 0;
|
||||
|
||||
public static LevelChanger Singleton { get; private set; }
|
||||
|
||||
public void OnTriggerEnter(Collider collider)
|
||||
{
|
||||
//animator.SetTrigger("FadeOut");
|
||||
}
|
||||
|
||||
public void EnableControls()
|
||||
{
|
||||
//InputManager.Instance.enabled = true;
|
||||
}
|
||||
|
||||
public void DisableControls()
|
||||
{
|
||||
//InputManager.Instance.enabled = false;
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Singleton is not null && Singleton != this)
|
||||
Destroy(this);
|
||||
else
|
||||
Singleton = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user