Esempio n. 1
0
  protected void paint(Graphics g) {

    // Pintamos mapa
    map.paint(g);

    // Actualizamos el menu
    // Por ahora no lo hacemos
  }
Esempio n. 2
0
 public void commandAction(Command c, Displayable d) {
   if (c == exitCommand) {
     GolfController.getInstance().endGame();
   } else if (c == volverCommand) {
     GolfController.getInstance().goMain(false);
   } else if (c == rotateCommand) {
     map.rotate();
   } else if (c == zoominCommand) {
     map.zoomin();
   } else if (c == zoomoutCommand) {
     map.zoomout();
   } else if (c == nozoomCommand) {
     map.nozoom();
   } else if (c == finhoyoCommand) {
     GolfController.getInstance().getGame().viewCard();
   } else if (c == golpeCommand) {
     GolfController.getInstance().getGame().golpe();
   }
 }
Esempio n. 3
0
 protected void keyPressed(int key) {
   int action = getGameAction(key);
   map.keyPressed(action, false);
 }
Esempio n. 4
0
 protected void keyRepeated(int key) {
   int action = getGameAction(key);
   map.keyPressed(action, true);
 }