/// <summary> /// Ends the game /// </summary> public void EndGame() { TogglePlayer(false); CancelInvoke(); ObjectPoolManager.Instance.ResetObjects(); UserInterface.EndGame(); //Adjust the UI }
/// <summary> /// Ends the game /// </summary> public void EndGame() { TogglePlayer(false); CancelInvoke(); foreach (GameObject enemy in GameObject.FindGameObjectsWithTag("Enemy")) { Destroy(enemy); } UserInterface.EndGame(); //Adjust the UI }