Beispiel #1
0
 // Use this for initialization
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         if (this != instance)
         {
             Destroy(gameObject);
         }
     }
 }
Beispiel #2
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();
    }
Beispiel #3
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));
        }
    }