@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); }
public void update(Player p) { veloX = (int) p.getVelocity().x; veloY = (int) p.getVelocity().y; }
public boolean equals(Player p) { return veloX == (int) p.getVelocity().x && veloY == (int) p.getVelocity().y; }
public PositionState(Player p) { veloX = (int) p.getVelocity().x; veloY = (int) p.getVelocity().y; }