Beispiel #1
0
    void UpdateTimer()
    {
        if (timeIsUp)
        {
            return;
        }
        if (timeLeft <= 0)
        {
            timeIsUp = true;
            DisableButtons();
            print(GameObject.Find("Question").GetComponent <Image>().color);
            print(new Color(56, 56, 56, 128));
            GameObject.Find("Question").GetComponent <Image>().color = new Color((float)150 / 255, (float)150 / 255, (float)150 / 255, (float)150 / 255);
            ScoreKeeper.DisplayFinalScore();
            timerText.text = "time: 0";
            return;
        }
        timeLeft -= Time.deltaTime;
        int timeInt = (int)timeLeft + 1;

        timerText.text = "time: " + timeInt.ToString();
    }