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); }
public static float Ease(EaseType easeType, float from, float to, float t, float duration) { return(UnclampedLerp(from, to, EaseHelper.Ease(easeType, t, duration))); }
public static Quaternion Ease(EaseType easeType, Quaternion from, Quaternion to, float t, float duration) { return(Quaternion.Lerp(from, to, EaseHelper.Ease(easeType, t, duration))); }
public static Color32 Ease(EaseType easeType, Color32 from, Color32 to, float t, float duration) { return(UnclampedLerp(from, to, EaseHelper.Ease(easeType, t, duration))); }
public static Vector4 Ease(EaseType easeType, Vector4 from, Vector4 to, float t, float duration) { return(UnclampedLerp(from, to, EaseHelper.Ease(easeType, t, duration))); }