Beispiel #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) {
   }
 }
Beispiel #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);
 }
Beispiel #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);
 }