public float getRamp(float pSecondsElapsed, float pDuration)
        {
            float percentage = pSecondsElapsed / pDuration;

            if (percentage < 0.5f)
            {
                return(0.5f * RampQuartIn.getValue(2 * percentage));
            }
            else
            {
                return(0.5f + 0.5f * RampQuartOut.getValue(percentage * 2 - 1));
            }
        }
Ejemplo n.º 2
0
 public float getRamp(float pSecondsElapsed, float pDuration)
 {
     return(RampQuartIn.getValue(pSecondsElapsed / pDuration));
 }