void defeat() { if (lives <= 0 || TimeRemaining <= 0) { stop(); DefeatScreen.SetActive(true); } }
public void GameOver(EndCondition endCondition) { Time.timeScale = 0f; if (endCondition == EndCondition.Victory) { Text[] info = VictoryScreen.GetComponentsInChildren <Text>(); info[0].text = string.Format("{0:00}:{1:00}", totalTime / 60, totalTime % 60); info[1].text = totalGameOvers.ToString(); totalTime = 0f; totalGameOvers = 0; VictoryScreen.SetActive(true); } else if (endCondition == EndCondition.Defeat) { DefeatScreen.SetActive(true); } }