22 lines
528 B
C#
22 lines
528 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class GameController : MonoBehaviour
|
|
{
|
|
private static GameController instance;
|
|
public bool isOver{get; set;} //The game is over
|
|
public static GameController Instance{
|
|
get{
|
|
if(instance is null)Debug.LogError("Game controller is null");
|
|
return instance;
|
|
}
|
|
}
|
|
|
|
private void Awake() {
|
|
instance = this;
|
|
DontDestroyOnLoad(this.gameObject);
|
|
isOver = false;
|
|
}
|
|
}
|