// issue #80. Instead of hooking step:, hook update: since it can be called by any // container action like CCRepeat, CCSequence, CCEase, etc.. public override void update(float dt) { if (FloatUtils.EB(dt, _nextDt)) { while (FloatUtils.Big(dt, _nextDt) && _total < _times) { _innerAction.update(1.0f); _total++; _innerAction.stop(); _innerAction.startWithTarget(_target); _nextDt += _innerAction.duration / _duration; } // fix for issue #1288, incorrect end value of repeat if (FloatUtils.EB(dt, 1.0f) && _total < _times) { _total++; } // don't set a instantaction back or update it, it has no use because it has no duration if (!_isActionInstant) { if (_total == _times) { _innerAction.update(1); _innerAction.stop(); } else { // issue #390 prevent jerk, use right update _innerAction.update(dt - (_nextDt - _innerAction.duration / _duration)); } } } else { _innerAction.update((dt * _times) % 1.0f); } }
public override void update(float dt) { _action.update(dt); }
public override void update(float t) { _other.update(1 - t); }
public override void update(float dt) { _one.update(dt); _two.update(dt); }