- override
Sets the action to a specific point in time. The t
value that is passed
in is a normalized value 0.0 to 1.0 of the duration of the action. Every
action will always recieve a callback with the end time point (1.0),
unless it is cancelled.
Source
@override void update(double t) { int currentRepeat = math.min((t * numRepeats.toDouble()).toInt(), numRepeats - 1); for (int i = math.max(_lastFinishedRepeat, 0); i < currentRepeat; i++) { if (!action._finished) action.update(1.0); action._reset(); } _lastFinishedRepeat = currentRepeat; double ta = (t * numRepeats.toDouble()) % 1.0; action.update(ta); if (t >= 1.0) { action.update(1.0); action._finished = true; } }