Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (gameType == 1)
        {
            if (gameType == 1)
            {
                timerTime.text = (timerFloat.ToString("f0") + " s");
                CalcTime();
            }

            if (timerFloat > 10)
            {
                txtColor.color = t1;
                i = 0;
            }
            if (timerFloat <= 10)
            {
                txtColor.color = t2;

                i += Time.deltaTime;
                if (i > 1f)
                {
                    i = 0;
                }
                if (i >= 0.6f)
                {
                    timerTime.text = (timerFloat.ToString("f0") + " s");
                }

                else if (i <= 0.3f)
                {
                    timerTime.text = "";
                }

                if (timerFloat < 0 && !noTime)
                {
                    noTime = true;
                    over.NomoreTime();
                }
            }
            if (timerFloat >= 59)
            {
                timerFloat = 59;
            }
        }
    }