Exemplo n.º 1
0
        private void ApplyGravityAndJetPack()
        {
            float speedModifier = -gravity *loopTimer.GetLoopTime();

            if (jetPackActive)
            {
                speedModifier += jetPackStrength * loopTimer.GetLoopTime();
            }
            speed += speedModifier;
            if (speed > maxSpeed)
            {
                speed = maxSpeed;
            }
            else if (speed < minSpeed)
            {
                speed = minSpeed;
            }
        }
Exemplo n.º 2
0
 protected float GetLoopTime()
 {
     return(loopTimer.GetLoopTime());
 }