Esempio n. 1
0
    IEnumerator GameOver()
    {
        NewBallManager.GetInstance().FreezeBalls();

        yield return(StartCoroutine(Explode()));

        NewBallManager.GetInstance().KillAllBalls();
        EventManager.TriggerEvent("CleanUp");

        yield return(StartCoroutine(CountdownScore()));

        yield return(StartCoroutine(InterstitalAd()));

        yield return(StartCoroutine(Implode()));

        ScoreMaskEffect.GetInstance().Reset();
        NewGameManager.GetInstance().ResetGame();
    }
Esempio n. 2
0
    IEnumerator CountdownScore()
    {
        yield return(StartCoroutine(ScoreMaskEffect.GetInstance().PrepEffect(target)));

        yield return(StartCoroutine(NewScoreManager.GetInstance().HighscoreProcess()));

        float shortDelay = countdownDuration / NewScoreManager._catchCount;

        while (NewScoreManager._catchCount > 0)
        {
            NewScoreManager._catchCount--;
            yield return(new WaitForSeconds(shortDelay));
        }

        yield return(new WaitForSeconds(.15f));

        float longDelay = countdownDuration / NewScoreManager._numBalls;

        while (NewScoreManager._numBalls > 0)
        {
            NewScoreManager._numBalls--;
            yield return(new WaitForSeconds(longDelay));
        }
    }