public void HasHitEndBox() { Cursor.visible = true; allAllies = null; endRoomLocations = null; SceneManager.LoadScene("EndGameScene"); }
void Awake() { endRoomLocations = FindObjectOfType <EndRoomAllyLocations_Aidan>(); allAllies = FindObjectsOfType <AllyAI_Aidan>(); if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
void SetEndDestination() { if (endRoomLocations == null) { endRoomLocations = FindObjectOfType <EndRoomAllyLocations_Aidan>(); } if (allAllies == null) { allAllies = FindObjectsOfType <AllyAI_Aidan>(); } for (int i = 0; i < allAllies.Length; i++) { int modNum = i % endRoomLocations.allEndAllyLocations.Length; allAllies[i].SetEndDestination(endRoomLocations.allEndAllyLocations[modNum].position); } isDoorBroken = false; }
void Start() { endRoomLocations = FindObjectOfType <EndRoomAllyLocations_Aidan>(); allAllies = FindObjectsOfType <AllyAI_Aidan>(); }