Beispiel #1
0
 // This function must be edited
 public void setUnit(PhysicalUnit pu) {
   if (pu != null && pu.isAlly()) {
     setExplored(true);
     if (GameMap.getInstance() != null) {
       for (Tile t : GameMap.getInstance().getNeighbours(this, pu.getType().getVision())) {
         t.setExplored(true);
         t.getView().repaint();
       }
     }
   } else {
     // countToFog = 0;
   }
   unit = pu;
   view.repaint();
 }
Beispiel #2
0
 public BufferedImage getUnitImg() {
   return unit.getImage();
 }