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 Color32 ease(EaseType easeType, Color32 from, Color32 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 Vector4 ease(EaseType easeType, Vector4 from, Vector4 to, float t, float duration) { return(unclampedLerp(from, to, EaseHelper.ease(easeType, t, duration))); }