예제 #1
0
 public void handleInput() {
   if (Keys.isPressed(Keys.ESCAPE)) {
     JukeBox.stop("music1");
     gsm.setPaused(true);
   }
   if (blockInput) return;
   if (Keys.isDown(Keys.LEFT)) player.setLeft();
   if (Keys.isDown(Keys.RIGHT)) player.setRight();
   if (Keys.isDown(Keys.UP)) player.setUp();
   if (Keys.isDown(Keys.DOWN)) player.setDown();
   if (Keys.isPressed(Keys.SPACE)) player.setAction();
 }