コード例 #1
0
 void PlayerJump()
 {
     //If player has jumped once or more, player is not grounded and avaliable jumps are subtracted
     if (jumpCount > 0)
     {
         utility.Jump();
         grounded  = false;
         jumpCount = jumpCount - 1;
     }
     //if the player has used all jumps, this function is restarted
     if (jumpCount == 0)
     {
         return;
     }
 }
コード例 #2
0
 public override void Simulate()
 {
     // Simulates the jump mechanic on the player
     player.Jump();
 }