Ejemplo n.º 1
0
 public static RampQuartIn getInstance()
 {
     if (INSTANCE == null)
     {
         INSTANCE = new RampQuartIn();
     }
     return(INSTANCE);
 }
        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.º 3
0
 public float getRamp(float pSecondsElapsed, float pDuration)
 {
     return(RampQuartIn.getValue(pSecondsElapsed / pDuration));
 }