@Override public void controlPressed(Command command) { LOGGER.debug("com.jed.state.PlayState#controlPressed"); LOGGER.info("controlPressed {}",command.toString()); if(command.equals(new BasicCommand("pauseToggle"))) { paused = !paused; } else if(command.equals(new BasicCommand("stepFrame"))) { if (paused) { stepFrame = true; } } else if(command.getName().equals(BasicCommandConstants.JUMP)) { currentMap.getPlayer().setJumping(true); } else if(command.getName().equals(BasicCommandConstants.MOVE_RIGHT)) { currentMap.getPlayer().setMovingRight(true); } else if(command.getName().equals(BasicCommandConstants.MOVE_LEFT)) { currentMap.getPlayer().setMovingLeft(true); } }