Ejemplo n.º 1
0
 public static void setPlayerLevel(int level) {
   player_level = level;
   try {
     if (Bridge.getGame().getBoard().getType().equals(BoardType.GAME_BOARD)) {
       Bridge.getGame().loadLevel();
     }
   } catch (NullPointerException ex) {
   }
 }
Ejemplo n.º 2
0
 public static void displayMessage(
     int id, String message, int x, int y, int time, String color, int size) {
   ((GameBoard) Bridge.getGame().getBoard())
       .messages.put(
           id,
           message
               + ":"
               + ((x
                   - ((GameBoard) Bridge.getGame().getBoard())
                           .getFontMetrics(new Font("Helvetica", Font.BOLD, size))
                           .stringWidth(message)
                       / 2))
               + ":"
               + y
               + ":"
               + time
               + ":"
               + color
               + ":"
               + size);
 }
Ejemplo n.º 3
0
 public static void addPlayerMessage(
     int id, String message, int xmod, int ymod, int time, String color, int size) {
   ((GameBoard) Bridge.getGame().getBoard())
       .messages_player.put(
           id, message + ":" + xmod + ":" + ymod + ":" + time + ":" + color + ":" + size);
 }