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