示例#1
0
  protected void paint(Graphics g) {

    // Pintamos mapa
    map.paint(g);

    // Actualizamos el menu
    // Por ahora no lo hacemos
  }
示例#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();
   }
 }
示例#3
0
 protected void keyPressed(int key) {
   int action = getGameAction(key);
   map.keyPressed(action, false);
 }
示例#4
0
 protected void keyRepeated(int key) {
   int action = getGameAction(key);
   map.keyPressed(action, true);
 }