public override void Play() { if (_currentTweenHandle == null && _tweenList.Count > 0 && _index == 0) { _currentTweenHandle = _tweenList[_index++]; _currentTweenHandle.AddOnStartedListener(OnTweenStarted); _currentTweenHandle.Play(); } else { _currentTweenHandle?.Play(); } }
public override void Restart() { for (var i = 0; i < _tweenList.Count; i++) { _tweenList[i].Rewind(); } if (_tweenList.Count > 0) { _index = 1; _currentTweenHandle = _tweenList[0]; _currentTweenHandle.Play(); } else { _index = 0; } }
private void OnTweenCompleted() { if (_tweenList.Count == 0) { return; } if (_index > _tweenList.Count - 1) { _onComplete?.Invoke(); } else { _currentTweenHandle = _tweenList[_index++]; _currentTweenHandle.Play(); _onStep?.Invoke(); } }