Ejemplo n.º 1
0
 public void keyReleased(KeyEvent e) {
   Action gameAction = getKeyAction(e);
   if (gameAction != null) {
     gameAction.release();
   }
   e.consume();
 }
Ejemplo n.º 2
0
 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();
   }
 }
Ejemplo n.º 3
0
 public void mouseReleased(MouseEvent e) {
   Action gameAction = getMouseButtonAction(e);
   if (gameAction != null) {
     gameAction.release();
   }
 }