private IEnumerator StartGameTimer() { GameRunning = true; currentMatchTime = timeLimit; while (currentMatchTime > 0 && GameRunning) { onTimerChanged.Raise(); currentMatchTime--; if (currentMatchTime <= 4) { sfxManager.PlaySound(soundStorage.GetCountdownSound()); } yield return(new WaitForSeconds(1)); } onTimerChanged.Raise(); GameRunning = false; gameData.SetGameWinner(modeManager.GetMaxScore()); DeactivatePlayersAndGoals(); sfxManager.PlaySound(soundStorage.GetMatchEndSound()); lightsController.HitAllTheLightsAsTeam(modeManager.GetMaxScore(), 10); int postMatchTimer = 4; while (postMatchTimer > 0) { postMatchTimer--; yield return(new WaitForSeconds(1)); } EndMatch(); }