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
ファイル: TransformSpringTween.cs プロジェクト: v-karpov/Nez
        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
 protected override void UpdateValue()
 {
     SetTweenedValue(Lerps.Ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
 }
コード例 #4
0
 protected override void updateValue()
 {
     _target.setTweenedValue(Lerps.ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
 }