Exemple #1
0
 /// <summary>
 /// Stops the coroutine for the timer so that it no longer increases
 /// However, it does keep its current state so that it can be resumed
 /// </summary>
 /// <param name="timer"></param>
 public void PauseTimer(CoolDownTimer timer)
 {
     if (timer != null && timer.IsRunning)
     {
         timer.StopTimer();
         StopCoroutine(timer.TimerRoutine());
     }
 }
Exemple #2
0
 /// <summary>
 /// Ensures the timer routine is stopped, resets it, and restarts it
 /// </summary>
 /// <param name="timer"></param>
 public void ResumeTimer(CoolDownTimer timer)
 {
     // Restart timer where it was
     if (timer != null && !timer.IsRunning)
     {
         StartCoroutine(timer.TimerRoutine());
     }
 }