public float Evaluate(float step) { if (step < 0.5f) { return(0.5f * bounceIn.Evaluate(step * 2f)); } return(0.5f * bounceOut.Evaluate(step * 2f - 1f) + 0.5f); }
public void Update(float deltaTime) { step += deltaTime / duration; step = Mathf.Clamp01(step); var evaluation = easingEquation.Evaluate(step); var result = GetLerpValue(data, evaluation); onProgressAction.Invoke(result); if (step < 1f) { return; } updateInvoker.Remove(this); onCompleteAction.Invoke();; }
public float Evaluate(float step) { return(1f - bounceOut.Evaluate(1f - step)); }