Noah2610 / deathfloor

Work-in-progress Mega Man inspired game.
MIT License
2 stars 0 forks source link

Only apply low gravity when holding jump while player has positive y velocity #14

Closed hoichael closed 4 years ago

Noah2610 commented 4 years ago

Switches to normal player gravity, if the player's y velocity is below 0.0 (this value should eventually be configurable via a settings file).


Player gravity now depends on the player's y velocity and if the jump button is being pressed, instead of if the player is currently in the "jumping" state. This means, for example, if the player is jumping on a jumppad, they release the jump button and re-press it again, then the jump gravity will be used again. Previously, the jump gravity would only be used after the player jumped and while they didn't let go of the jump button.