// 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(); }
public BufferedImage getUnitImg() { return unit.getImage(); }