diff --git a/src/main/java/com/dinosaur/dinosaurexploder/controller/DinosaurController.java b/src/main/java/com/dinosaur/dinosaurexploder/controller/DinosaurController.java index 4daf896..9aabacb 100644 --- a/src/main/java/com/dinosaur/dinosaurexploder/controller/DinosaurController.java +++ b/src/main/java/com/dinosaur/dinosaurexploder/controller/DinosaurController.java @@ -54,6 +54,12 @@ public void initInput() { onKey(KeyCode.RIGHT, () -> player.getComponent(PlayerComponent.class).moveRight()); onKeyDown(KeyCode.SPACE,() -> player.getComponent(PlayerComponent.class).shoot()); + + onKey(KeyCode.W, () -> player.getComponent(PlayerComponent.class).moveUp()); + onKey(KeyCode.S, () -> player.getComponent(PlayerComponent.class).moveDown()); + onKey(KeyCode.A, () -> player.getComponent(PlayerComponent.class).moveLeft()); + onKey(KeyCode.D, () -> player.getComponent(PlayerComponent.class).moveRight()); + } /** * Summary :