Beispiel #1
0
 private void Jump()
 {
     if (m_Grounded || m_JumpCount < PlayerManagerProxy.Get().GetPlayerStat().m_JumpNumber)
     {
         m_JumpCount++;
         m_Mover.CancelYVelocity();
         m_Mover.ApplyForce(new Vector2(0f, m_JumpForce));
     }
 }
Beispiel #2
0
 private void Jump()
 {
     if (m_Grounded)
     {
         // Don't wait fo the physic to set m_Grounded to false to ensure applying the force only once
         m_Grounded = false;
         m_Mover.ApplyForce(new Vector2(0f, m_JumpForce));
     }
 }