From ed871fc5d47676e6c8f7920ed22f5c90846042b4 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 30 Nov 2025 03:42:57 +0100 Subject: [PATCH] added coordinates and map tile position to debug mode --- src/de/miaurizius/jgame2d/core/GamePanel.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/de/miaurizius/jgame2d/core/GamePanel.java b/src/de/miaurizius/jgame2d/core/GamePanel.java index 3c3c485..292ee3f 100644 --- a/src/de/miaurizius/jgame2d/core/GamePanel.java +++ b/src/de/miaurizius/jgame2d/core/GamePanel.java @@ -146,10 +146,13 @@ public class GamePanel extends JPanel implements Runnable { // DEBUG if(keyH.debug) { + int start = 350; graphics2d.setColor(Color.white); - graphics2d.drawString("Draw Time: " + passed, 10, 400); - graphics2d.drawString("FPS: " + fpsMeasure, 10, 400+tileSize); - graphics2d.drawString("Invincible: " + player.invincibleCount, 10, 400+tileSize*2); + graphics2d.drawString("Draw Time: " + passed, 10, start); + graphics2d.drawString("FPS: " + fpsMeasure, 10, start+tileSize); + graphics2d.drawString("Invincible: " + player.invincibleCount, 10, start+tileSize*2); + graphics2d.drawString("X, Y: " + player.worldX+", "+player.worldY, 10, start+tileSize*3); + graphics2d.drawString("Col, Row: " + (player.worldX+player.solidArea.x)/tileSize+", "+(player.worldY+player.solidArea.y)/tileSize, 10, start+tileSize*4); Boot.logger.log(Level.FINE, "Draw Time: " + passed); }