Example #1
0
    public void OnPostGoal()
    {
        goalScored = false;
        if (endGame)
        {
            LevelTransition.FadeToNextLevel();
        }

        if (teamOneScore >= scoreToWin)
        {
            OnWin(GameData.TeamOneName);
        }
        else if (teamTwoScore >= scoreToWin)
        {
            OnWin(GameData.TeamTwoName);
        }
        else
        {
            Confetti.Stop();
            Scoreboard.HideMessage();
            ResetAllPiecesToStart();
            Time.timeScale = 1f;
        }
    }
 protected override void OnDisappearing()
 {
     base.OnDisappearing();
     Confetti.Stop();
 }