Esempio n. 1
0
    private void Update()
    {
        text.text = ((int)(Timer / 60)).ToString("00") + " : " + ((int)(Timer % 60)).ToString("00");
        if (!IsStart)
        {
            return;
        }
        if (Timer <= 0)
        {
            if (!IsEnd)
            {
                IsEnd = true;

                // Finish改成由SceneManager發

                Finish.Play();
                FinishEvent();
                StartCoroutine(_FinishEvent());
            }
        }
        else
        {
            Timer -= Time.deltaTime;
            Timer  = Mathf.Max(0, Timer);
            // text.text = ((int)(Timer/60)).ToString("00") + " : " + ((int)(Timer % 60)).ToString("00");
        }
    }