series of static methods to handle all common tween type structs along with unclamped lerps for them. unclamped lerps are required for bounce, elastic or other tweens that exceed the 0 - 1 range.
示例#1
0
        public override bool Tick()
        {
            if (!_isPaused)
            {
                SetTweenedValue(Lerps.FastSpring(GetCurrentValueOfTweenedTargetType(), _targetValue, ref _velocity, DampingRatio, AngularFrequency));
            }

            return(false);
        }
 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
 protected override void UpdateValue()
 {
     SetTweenedValue(Lerps.Ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
 }
 protected override void updateValue()
 {
     _target.setTweenedValue(Lerps.ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
 }