made path visible in debug mode

This commit is contained in:
2025-12-12 21:41:04 +01:00
parent 9484797ced
commit 4276c24392

View File

@@ -147,6 +147,17 @@ public class TileManager {
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);
}
}
}
}