- override
This method is called by the Juggler
with the time
past since the last
call.
Returns true as long as this Animatable
is not completed; false if it
is completed.
Source
@override bool advanceTime(num time) { if (_currentTime < _totalTime || _started == false) { _currentTime = _currentTime + time; if (_currentTime > _totalTime) { _currentTime = _totalTime; } if (_currentTime >= 0.0) { // set startValues if this is the first start if (_started == false) { _started = true; for (int i = 0; i < _tweenPropertyList.length; i++) { _tweenPropertyList[i]._init(); } if (_onStart != null) { _onStart(); } } // calculate transition ratio and value num ratio = _currentTime / _totalTime; num transition = _transition(ratio).toDouble(); for (int i = 0; i < _tweenPropertyList.length; i++) { _tweenPropertyList[i]._update(transition, _roundToInt); } if (_onUpdate != null) { _onUpdate(); } if (_onComplete != null && _currentTime == _totalTime) { _onComplete(); } } } return _currentTime < _totalTime; }