Exemplo n.º 1
0
 public void OnMouseUp()
 {
     StartCoroutine(DeathScript.Reset(false));
     if (gameObject.name == "try again")
     {
         DeathScript.ResetDeaths();
     }
 }
Exemplo n.º 2
0
    void UpdateTimer()
    {
        timeText.text = ConvertSecsToString(timeInSec);

        if (countDown)
        {
            timeInSec--;
        }

        else
        {
            timeInSec++;
        }

        if (countDown && timeInSec == 9)
        {
            watch.color    = Color.red;
            timeText.color = Color.red;
            ChangeToColor(red);
        }

        if (countDown && timeInSec < 0)
        {
            timerActive = false;
            GPlayclass.UnlockAchievement("CgkI-Meyi84DEAIQCA");
            StartCoroutine(DeathScript.Reset(false));
        }

        if (timeInSec > 3599)
        {
            StartCoroutine(DeathScript.Reset(false));
        }

        if (timeInSec == 180)
        {
            GPlayclass.UpdateEvent("CgkI-Meyi84DEAIQCQ", 1);
        }

        else if (timeInSec == 360)
        {
            GPlayclass.UpdateEvent("CgkI-Meyi84DEAIQCQ", 2);
        }
    }