/// <summary> /// /// </summary> void Update() { if (UmpireControl.isGameStarted && !m_isGameStarted) { for (int i = 0; i < m_bandits.Count; i++) { // show the bandit GameObject bandit = m_bandits[i]; bandit.SetActive(true); // start the bandit's countdown Bandit banditScript = bandit.GetComponent <Bandit>(); banditScript.StartFireCountdown(); } m_isGameStarted = true; } if (m_bandits.Count == 0 && !m_isGameFinished) { UmpireControl umpire = FindObjectOfType <UmpireControl>(); umpire.gameSuccess(); float reactionTime = UmpireControl.reactionTimer; if (HighscoreManager.GetHighscore("Mexican Standoff") > reactionTime) { HighscoreManager.SetHighscore("Mexican Standoff", reactionTime); } umpire.ShowHighscore(HighscoreManager.GetHighscore("Mexican Standoff")); m_isGameFinished = true; } }