@Override
  public void update(float elapsed) {
    if (controller.justPressed(KeyEvent.VK_I) || controller.justPressed(KeyEvent.VK_ESCAPE)) {
      player.setControllerActive(true);
      game.setGameState(GameState.InGame);
      return;
    }

    player.setControllerActive(false);
    inventory.setDrawTooltip(true);
    inventory.update(elapsed);
    dManager.update(elapsed);
  }
 @Override
 public void exit() {
   player.setControllerActive(true);
 }
예제 #3
0
 public void update(Player p) {
   veloX = (int) p.getVelocity().x;
   veloY = (int) p.getVelocity().y;
 }
예제 #4
0
 public boolean equals(Player p) {
   return veloX == (int) p.getVelocity().x && veloY == (int) p.getVelocity().y;
 }
예제 #5
0
 public PositionState(Player p) {
   veloX = (int) p.getVelocity().x;
   veloY = (int) p.getVelocity().y;
 }