made path visible in debug mode
This commit is contained in:
@@ -147,6 +147,17 @@ public class TileManager {
|
|||||||
worldRow++;
|
worldRow++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(panel.keyH.debug) {
|
||||||
|
graphics2D.setColor(new Color(255, 0, 0, 70));
|
||||||
|
for(int i = 0; i < panel.pFinder.pathList.size(); i++) {
|
||||||
|
int worldX = panel.pFinder.pathList.get(i).col * panel.tileSize;
|
||||||
|
int worldY = panel.pFinder.pathList.get(i).row * panel.tileSize;
|
||||||
|
int screenX = worldX - panel.player.worldX + panel.player.screenX;
|
||||||
|
int screenY = worldY - panel.player.worldY + panel.player.screenY;
|
||||||
|
|
||||||
|
graphics2D.fillRect(screenX, screenY, panel.tileSize, panel.tileSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user