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; } }
public override void Simulate() { // Simulates the jump mechanic on the player player.Jump(); }