Esempio n. 1
0
 private void stop()
 {
     if (isInProgress)
     {
         this.interrupt();
         OnTimerStop?.Invoke(this);
     }
 }
Esempio n. 2
0
    private IEnumerator CountDown()
    {
        float count = secondsToCount;

        while (count > 0f)
        {
            yield return(new WaitForSeconds(tickTime));

            count--;
            OnChangeTime?.Invoke(count);
        }
        OnTimerStop?.Invoke();
    }
Esempio n. 3
0
    private IEnumerator CountUp()
    {
        float count = 0f;

        while (count < secondsToCount)
        {
            yield return(new WaitForSeconds(tickTime));

            count++;
            OnChangeTime?.Invoke(count);
        }
        OnTimerStop?.Invoke();
    }