void OnDisable() { if (instance != null) { instance = null; } }
void Start() { mainPlayerCollider = PlayerMove.MainPlayerCollider; // this is so the HUDMenuController knows how many objectives there are HUDMenuController.addObjective(isFinal); }
void OnEnable() { if (instance != null && instance != this) { // Application.Quit(); // replace this with a proper throw statement } else { instance = this; } }
void OnApplicationQuit() { instance = null; }