private IEnumerator CountDown() { float count = secondsToCount; while (count > 0f) { yield return(new WaitForSeconds(tickTime)); count--; OnChangeTime?.Invoke(count); } OnTimerStop?.Invoke(); }
private IEnumerator CountUp() { float count = 0f; while (count < secondsToCount) { yield return(new WaitForSeconds(tickTime)); count++; OnChangeTime?.Invoke(count); } OnTimerStop?.Invoke(); }