Exemplo n.º 1
0
    IEnumerator CountdownTimer()
    {
        this.bannerView.Hide();

        while (timeLeft >= 0)
        {
            //Debug.Log(timeLeft);
            countdownText.text = "" + timeLeft;
            if (timeLeft == 0)
            {
                countdownText.text = "GO!";
                yield return(new WaitForSeconds(0.5f));
            }
            else
            {
                yield return(new WaitForSeconds(1));
            }

            timeLeft--;
        }

        //countdownText.gameObject.SetActive(false);
        countdownCanvas.SetActive(false);
        //Debug.Log("end");

        levelController.Restart();
        optionSprites.SetActive(true);

        this.bannerView.Show();
    }
Exemplo n.º 2
0
        public void RestartButton()
        {
            ILevelController levelController = LevelController.Instance;

            levelController.Restart();
        }