/// <summary> /// Ends the iteration, repeat if there are remaining iterations, end the timer if not /// </summary> public void EndIteration() { remainingIterations--; if (remainingIterations == 0) { OnIterationEnded?.Invoke(); EndTimer(); } else { EndIterationAndRepeat(); } }
/// <summary> /// End an iteration, call the linked events and then repeat the timer /// </summary> public void EndIterationAndRepeat() { OnIterationEnded?.Invoke(); counter = duration; }