Esempio n. 1
0
 protected override void UpdateValue()
 {
     // special case for non-relative angle lerps so that they take the shortest possible rotation
     if ((_targetType == TransformTargetType.EulerAngles || _targetType == TransformTargetType.LocalEulerAngles) && !_isRelative)
     {
         if (_animationCurve != null)
         {
             SetTweenedValue(TweenMath.EaseAngle(_animationCurve, _fromValue, _toValue, _elapsedTime, _duration));
         }
         else
         {
             SetTweenedValue(TweenMath.EaseAngle(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
         }
     }
     else
     {
         if (_animationCurve != null)
         {
             SetTweenedValue(TweenMath.Ease(_animationCurve, _fromValue, _toValue, _elapsedTime, _duration));
         }
         else
         {
             SetTweenedValue(TweenMath.Ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
         }
     }
 }
Esempio n. 2
0
        public override bool Tick()
        {
            if (!_isPaused)
            {
                SetTweenedValue(TweenMath.FastSpring(GetCurrentValueOfTweenedTargetType(), _targetValue, ref _velocity, DampingRatio, AngularFrequency));
            }

            return(false);
        }
Esempio n. 3
0
 protected override void UpdateValue()
 {
     if (_animationCurve != null)
     {
         _target.SetTweenedValue(TweenMath.Ease(_animationCurve, _fromValue, _toValue, _elapsedTime, _duration));
     }
     else
     {
         _target.SetTweenedValue(TweenMath.Ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
     }
 }