- override
Moves to the next time step in an action, dt
is the delta time since
the last time step in seconds. Typically this method is called from the
ActionController
.
Source
@override void step(double dt) { _elapsedInAction += dt; while (_elapsedInAction > action.duration) { _elapsedInAction -= action.duration; if (!action._finished) action.update(1.0); action._reset(); } _elapsedInAction = math.max(_elapsedInAction, 0.0); double t; if (action._duration == 0.0) { t = 1.0; } else { t = (_elapsedInAction / action._duration).clamp(0.0, 1.0); } action.update(t); }