Noah2610 / deathfloor

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

ControlPlayerJumpSystem shouldn't do actual jumping logic #84

Open Noah2610 opened 3 years ago

Noah2610 commented 3 years ago

ControlPlayerJumpSystem shouldn't change player gravity, instead another system (or maybe the HandleMovablesSystem) should update the entity's gravity, depending on Velocity, MoveAction (Jump, KillJump), standing on ground.

That way, every Jumper entity can actually have different gravities, not only the player. Also, then we can use the MoveAction(Jump) action and it would change gravity properly.

Originally posted by @Noah2610 in https://github.com/Noah2610/deathfloor/issues/79#issuecomment-693435802

Noah2610 commented 3 years ago

The HandleMovablesSystem should handle the jumping logic (change gravity, set jumper fields, etc.). The ControlPlayerJumpSystem should only trigger a jump when the user presses the jump button.