Example #1
0
    IEnumerator Countdown(string nextCoroutine = "")
    {
        yield return(new WaitForSeconds(2f));

        if (animateCanvases)
        {
            canvasesAnim.SetBool("up", true);
            animateCanvases = false;
        }

        CountDownManager.Three();
        yield return(new WaitForSeconds(1f));

        CountDownManager.Two();
        yield return(new WaitForSeconds(1f));

        CountDownManager.One();
        yield return(new WaitForSeconds(1f));

        CountDownManager.Go();
        ScoreKeeper.isGameRunning = true;

        if (nextCoroutine != "")
        {
            StartCoroutine(nextCoroutine);
        }
    }