Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (GetContadorTempo() > 0)
        {
            gamecontrol.ContinuaGame();
            gamecontrol.DesabilitaGame();
            animMensagem = GameObject.FindGameObjectWithTag("contadorTempo").GetComponent <Animator> ();
            animMensagem.Play("AnimeTempo");
            tempo -= Time.deltaTime;
            imgContadorTempo.fillAmount = tempo / 10;
            textTempo.text = tempo.ToString("0");

            if (GetContadorTempo() <= 0)
            {
                animMensagem = GameObject.FindGameObjectWithTag("contadorTempo").GetComponent <Animator> ();
                animMensagem.Play("AnimeTempo1");
                partidasControl.AdicionaPartidas(1);
                gamecontrol.HabilitaGame();
            }
        }
    }