示例#1
0
 public void setLabels() {
   int currentRoomID = model.getPlayer().getCurrentRoomID();
   magic.setText(model.getRoom(currentRoomID).getMagicName());
   health.setText("Health = " + model.getPlayer().getHealth());
   magic.setVerticalTextPosition(JLabel.TOP);
   exp.setText("Experience = " + model.getPlayer().getExp());
   currentRoom.setText("Current Room ID = " + model.getPlayer().getCurrentRoomID());
   playerItemLabel.setText("Player's Items (Max " + model.getPlayer().getExp() + ")");
 }
示例#2
0
 public Object[] getRoomItems() {
   int currentRoomID = model.getPlayer().getCurrentRoomID();
   ArrayList<String> itemList = model.getRoom(currentRoomID).getItemList();
   return itemList.toArray();
 }
示例#3
0
 public Object[] getHalls() {
   int currentRoomID = model.getPlayer().getCurrentRoomID();
   ArrayList<String> halls = model.getRoom(currentRoomID).getHallList();
   return halls.toArray();
 }