Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (QStart)
        {
            timer    -= Time.deltaTime;
            mqs.timer = timer;
            CancelBtn.GetComponentInChildren <TextMeshProUGUI>().text = timer.ToString("0") + "\nCancel";
        }
        if (QEnded || QCancelled)
        {
            timer = ThisQuest.time;
        }
        if (timer <= 0)
        {
            QEnded     = true;
            QStart     = false;
            QCancelled = false;

            CancelBtn.gameObject.SetActive(false);
            ClaimBtn.gameObject.SetActive(true);
        }
    }