示例#1
0
        public override bool Tick()
        {
            if (!_isPaused)
            {
                SetTweenedValue(Lerps.FastSpring(GetCurrentValueOfTweenedTargetType(), _targetValue, ref _velocity,
                                                 DampingRatio, AngularFrequency));
            }

            return(false);
        }
示例#2
0
 protected override void UpdateValue()
 {
     // special case for non-relative angle lerps so that they take the shortest possible rotation
     if ((_targetType == TransformTargetType.RotationDegrees ||
          _targetType == TransformTargetType.LocalRotationDegrees) && !_isRelative)
     {
         SetTweenedValue(Lerps.EaseAngle(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
     }
     else
     {
         SetTweenedValue(Lerps.Ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
     }
 }
示例#3
0
文件: Tweens.cs 项目: JonSnowbd/Ash
 protected override void UpdateValue()
 {
     _target.SetTweenedValue(Lerps.Ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
 }