public static IInterpolationFunction GetFunction(this ENormalizedValueInterpolation type) { switch (type) { case ENormalizedValueInterpolation.Linear: return(LinearInterpolation.Instance); case ENormalizedValueInterpolation.Quadratic: return(LinearInterpolation.Instance); case ENormalizedValueInterpolation.SquareRoot: return(LinearInterpolation.Instance); case ENormalizedValueInterpolation.SCurve2: return(LinearInterpolation.Instance); case ENormalizedValueInterpolation.Cubic: return(LinearInterpolation.Instance); case ENormalizedValueInterpolation.CubeRoot: return(LinearInterpolation.Instance); case ENormalizedValueInterpolation.SCurve4: return(LinearInterpolation.Instance); } return(LinearInterpolation.Instance); }
public InterpolatedValueOverTime(float value, float seconds = 0, ENormalizedValueInterpolation iterpolation = ENormalizedValueInterpolation.Linear) { _value = value; _seconds = seconds; _inpterpolation = iterpolation; }