diff --git a/lib/game/behaviors/player_keyboard_controller_behavior.dart b/lib/game/behaviors/player_keyboard_controller_behavior.dart index 082a0d47..226a4c1a 100644 --- a/lib/game/behaviors/player_keyboard_controller_behavior.dart +++ b/lib/game/behaviors/player_keyboard_controller_behavior.dart @@ -9,7 +9,7 @@ class PlayerKeyboardControllerBehavior extends Behavior { if (parent.isAlive) { // Keep jumping if started. - if (parent.jumping && parent.input.isPressed) { + if (parent.jumping && parent.input.isPressed && parent.isOnGround) { parent.jumping = true; } else { parent.jumping = false; diff --git a/lib/game/components/player.dart b/lib/game/components/player.dart index f8731121..5f1fd882 100644 --- a/lib/game/components/player.dart +++ b/lib/game/components/player.dart @@ -52,8 +52,8 @@ class Player extends JumperCharacter { input = gameRef.input; size = Vector2.all(gameRef.tileSize); - walkSpeed = gameRef.tileSize * 7; - minJumpImpulse = world.gravity * 0.6; + walkSpeed = gameRef.tileSize * 5; + minJumpImpulse = world.gravity * 0.7; cameraAnchor = PlayerCameraAnchor(); add(cameraAnchor);