Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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();;
        }
Esempio n. 3
0
 public float Evaluate(float step)
 {
     return(1f - bounceOut.Evaluate(1f - step));
 }