public void keyReleased(KeyEvent e) { Action gameAction = getKeyAction(e); if (gameAction != null) { gameAction.release(); } e.consume(); }
private void mouseHelper(MouseCode codeNeg, MouseCode codePos, int amount) { Action action; if (amount < 0) { action = mouseActions.get(codeNeg); } else { action = mouseActions.get(codePos); } if (action != null) { action.press(Math.abs(amount)); action.release(); } }
public void mouseReleased(MouseEvent e) { Action gameAction = getMouseButtonAction(e); if (gameAction != null) { gameAction.release(); } }