Method - Static
public static float Value(Func func, float t)
|
Parameters
func
|
Func
|
Easing function to use
|
t
|
float
|
Input value, functions are defined for values 0.0 to 1.0
|
Returns
float
Transformed value
DescriptionGet a float value transformed by an easing function specified by func . Examplefloat t = 0;
public void Update() { t += 0.01f; if (t > 1.0f) { t = 1.0f; } }
public void Render() { float yOffset = -50 + (50 * Ease.Value(Ease.Func.BounceOut, t)); RB.DrawSprite("title", new Vector2i(20, yOffset)); } |
See DocsFeatures - Interpolation |