From 6bfe740416f6f315a6d27c21a0ecd3d508e327b4 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Sun, 29 Dec 2019 12:25:13 +0400 Subject: [PATCH] Allow WASD --- core/src/com/me/pacman/state/PlayState.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/com/me/pacman/state/PlayState.java b/core/src/com/me/pacman/state/PlayState.java index fe6cbf4..c0f704d 100644 --- a/core/src/com/me/pacman/state/PlayState.java +++ b/core/src/com/me/pacman/state/PlayState.java @@ -415,17 +415,22 @@ public class PlayState extends LevelState { public boolean keyDown(int keycode) { switch (keycode) { case Input.Keys.UP: + case Input.Keys.W: pacman.setNextDirection(Direction.UP); break; case Input.Keys.DOWN: + case Input.Keys.S: pacman.setNextDirection(Direction.DOWN); break; case Input.Keys.LEFT: + case Input.Keys.A: pacman.setNextDirection(Direction.LEFT); break; case Input.Keys.RIGHT: + case Input.Keys.D: pacman.setNextDirection(Direction.RIGHT); break; + case Input.Keys.ESCAPE: case Input.Keys.P: paused = !paused; break;