예제 #1
0
 IEnumerator Clock()
 {
     while (currentValue > 0f)
     {
         currentValue -= GameTime.deltaTime;
         yield return(null);
     }
     HideMessage();
     ClockEnded?.Invoke();
     yield break;
 }
예제 #2
0
    protected virtual void CountDown()
    {
        time -= Time.deltaTime;

        if (time <= 0f)
        {
            finished = true;
            //onFinish = true;
            if (canInvoke)
            {
                ClockEnded?.Invoke();
            }
            else
            {
                canInvoke = true;
            }
        }
    }
예제 #3
0
 IEnumerator Clock()
 {
     while (currentValue > 0f)
     {
         currentValue -= GameTime.deltaTime;
         if (currentValue < 0f)
         {
             break;
         }
         else
         {
             text.text = $"{Math.Floor(currentValue)}";
         }
         yield return(null);
     }
     text.text = "0";
     ClockEnded?.Invoke();
     yield break;
 }