slight organization
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
public static GameManager Instance { get; private set; }
|
||||
public DialogueManager DialogueManager { get; private set; }
|
||||
|
||||
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;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
|
||||
DialogueManager = GetComponent<DialogueManager>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user