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(Zest.easeAngle(_animationCurve, _fromValue, _toValue, _elapsedTime, _duration));
         }
         else
         {
             setTweenedValue(Zest.easeAngle(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
         }
     }
     else
     {
         if (_animationCurve != null)
         {
             setTweenedValue(Zest.ease(_animationCurve, _fromValue, _toValue, _elapsedTime, _duration));
         }
         else
         {
             setTweenedValue(Zest.ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
         }
     }
 }
Esempio n. 2
0
        public override bool tick()
        {
            if (!_isPaused)
            {
                setTweenedValue(Zest.fastSpring(getCurrentValueOfTweenedTargetType(), _targetValue, ref _velocity, dampingRatio, angularFrequency));
            }

            return(false);
        }
Esempio n. 3
0
 protected override void updateValue()
 {
     if (_animationCurve != null)
     {
         _target.setTweenedValue(Zest.ease(_animationCurve, _fromValue, _toValue, _elapsedTime, _duration));
     }
     else
     {
         _target.setTweenedValue(Zest.ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration));
     }
 }
Esempio n. 4
0
        protected override void updateValue()
        {
            Rect newRect;

            if (_animationCurve != null)
            {
                newRect = Zest.ease(_animationCurve, _fromValue, _toValue, _elapsedTime, _duration);
            }
            else
            {
                newRect = Zest.ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration);
            }

            newRect = new Rect(newRect.x + this._offset.x, newRect.y + this._offset.y, newRect.width + this._offset.width, newRect.height + this._offset.height);

            _target.setTweenedValue(newRect);
        }
Esempio n. 5
0
        protected override void updateValue()
        {
            Color32 newColor;

            if (_animationCurve != null)
            {
                newColor = Zest.ease(_animationCurve, _fromValue, _toValue, _elapsedTime, _duration);
            }
            else
            {
                newColor = Zest.ease(_easeType, _fromValue, _toValue, _elapsedTime, _duration);
            }

            newColor = new Color32(
                (byte)(newColor.r + this._offset.r)
                , (byte)(newColor.g + this._offset.g)
                , (byte)(newColor.b + this._offset.b)
                , (byte)(newColor.a + this._offset.a)
                );

            _target.setTweenedValue(newColor);
        }