示例#1
0
        public void Run(Action onComplete = null)
        {
            Stop();

            _tween = CreateTween(_tweenParams.Duration)
                     .SetEase(_tweenParams.Ease);

            if (_tweenParams.Delay > 0)
            {
                _tween.SetDelay(_tweenParams.Delay);
            }

            if (onComplete != null)
            {
                _tween.OnComplete(onComplete);
            }

            if (_tweenParams.Loop != TweenLoopType.None)
            {
                _tween.SetLoop(_tweenParams.LoopCount, _tweenParams.Loop);
            }
        }