Allow WASD
This commit is contained in:
parent
bf0d5e041b
commit
6bfe740416
@ -415,17 +415,22 @@ public class PlayState extends LevelState {
|
|||||||
public boolean keyDown(int keycode) {
|
public boolean keyDown(int keycode) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case Input.Keys.UP:
|
case Input.Keys.UP:
|
||||||
|
case Input.Keys.W:
|
||||||
pacman.setNextDirection(Direction.UP);
|
pacman.setNextDirection(Direction.UP);
|
||||||
break;
|
break;
|
||||||
case Input.Keys.DOWN:
|
case Input.Keys.DOWN:
|
||||||
|
case Input.Keys.S:
|
||||||
pacman.setNextDirection(Direction.DOWN);
|
pacman.setNextDirection(Direction.DOWN);
|
||||||
break;
|
break;
|
||||||
case Input.Keys.LEFT:
|
case Input.Keys.LEFT:
|
||||||
|
case Input.Keys.A:
|
||||||
pacman.setNextDirection(Direction.LEFT);
|
pacman.setNextDirection(Direction.LEFT);
|
||||||
break;
|
break;
|
||||||
case Input.Keys.RIGHT:
|
case Input.Keys.RIGHT:
|
||||||
|
case Input.Keys.D:
|
||||||
pacman.setNextDirection(Direction.RIGHT);
|
pacman.setNextDirection(Direction.RIGHT);
|
||||||
break;
|
break;
|
||||||
|
case Input.Keys.ESCAPE:
|
||||||
case Input.Keys.P:
|
case Input.Keys.P:
|
||||||
paused = !paused;
|
paused = !paused;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user