Exemplo n.º 1
0
        protected override void UpdateValue()
        {
            var easedTime = EaseHelper.Ease(_easeType, _elapsedTime, _duration);
            var position  = _spline.GetPointOnPath(easedTime);

            // if this is a relative tween we use the fromValue (initial position) as a base and add the spline to it
            if (_isRelativeTween)
            {
                position += _fromValue;
            }

            SetTweenedValue(position);
        }
Exemplo n.º 2
0
 public static float Ease(EaseType easeType, float from, float to, float t, float duration)
 {
     return(UnclampedLerp(from, to, EaseHelper.Ease(easeType, t, duration)));
 }
Exemplo n.º 3
0
 public static Quaternion Ease(EaseType easeType, Quaternion from, Quaternion to, float t, float duration)
 {
     return(Quaternion.Lerp(from, to, EaseHelper.Ease(easeType, t, duration)));
 }
Exemplo n.º 4
0
 public static Color32 Ease(EaseType easeType, Color32 from, Color32 to, float t, float duration)
 {
     return(UnclampedLerp(from, to, EaseHelper.Ease(easeType, t, duration)));
 }
Exemplo n.º 5
0
 public static Vector4 Ease(EaseType easeType, Vector4 from, Vector4 to, float t, float duration)
 {
     return(UnclampedLerp(from, to, EaseHelper.Ease(easeType, t, duration)));
 }