public static TimeInterpolationFloat InterpolateTo(GameObject addComponentAt, float startInterpolation, float targetInterpolation, TimeData time, Action callback) { TimeInterpolationFloat timeInterpolation = addComponentAt.AddComponent <TimeInterpolationFloat>(); timeInterpolation.InterpolateTo(startInterpolation, targetInterpolation, time, callback, true); return(timeInterpolation); }
public virtual void FadeOut() { float currentComponentValue = GetComponentValue(); _timeInterpolationFloat = TimeInterpolationFloat.InterpolateTo(gameObject, currentComponentValue, minValue, fadeOutTime, OnFadeOutFinish, interpolationType); }