36 lines
667 B
C#
36 lines
667 B
C#
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;
|
|
}
|
|
}
|
|
}
|