Beispiel #1
0
        protected override void OnFiniteTaskFrameRun(float deltaTime)
        {
            while (HasRepetitionsRemaining && InnerTask.FrameRunFinishes(deltaTime))
            {
                RepetitionsCompleted++;

                deltaTime = InnerTask.OverflowDeltaTime;
                InnerTask.ResetSelf();
            }

            // A rare edge case could occur when the last task has a duration remaining close to 0,
            // and loss of floating point precision causes the base timer to activate
            // before activating the last task.
            if (IsFinished)
            {
                InnerTask.RunRemainingTime();
            }
        }