Esempio n. 1
0
    IEnumerator OnGoalCoroutine(Team teamThatScored)
    {
        endroundSound.Play();

        ChadHud.Instance.OnGoal(teamThatScored, 5.0f);
        Time.TimeScale = 0.5f;

        yield return(new WaitForSecondsRealtime(2.0f));

        ReplaySystem.recordGame = false;
        yield return(new WaitForSecondsRealtime(3.0f));

        Time.TimeScale = 1.0f;
        ReplaySystem.StartReplay(teamThatScored);
        yield return(new WaitForSecondsRealtime(ReplaySystem.durationInSeconds + 1.0f));

        ReplaySystem.recordGame = true;
        if (GoldenGoal)
        {
            OnMatchEnd();
        }
        else
        {
            OnRoundEnd();
            OnRoundStart();
        }
    }