예제 #1
0
    /// <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();
        }
    }
예제 #2
0
 /// <summary>
 /// End an iteration, call the linked events and then repeat the timer
 /// </summary>
 public void EndIterationAndRepeat()
 {
     OnIterationEnded?.Invoke();
     counter = duration;
 }