added monster damage

This commit is contained in:
2025-11-29 01:01:17 +01:00
parent d07077a5f1
commit a215cef7d7
8 changed files with 84 additions and 33 deletions

View File

@@ -31,7 +31,8 @@ public class GamePanel extends JPanel implements Runnable {
public final int maxWorldRow = 50;
//FPS
int FPS = 60;
final int FPS = 60;
int fpsMeasure;
// SYSTEM
public TileManager tileM = new TileManager(this);
@@ -96,7 +97,7 @@ public class GamePanel extends JPanel implements Runnable {
drawCount++;
}
if(timer >= 1000000000) {
System.out.println("FPS: " + drawCount);
fpsMeasure = drawCount;
drawCount = 0;
timer = 0;
}
@@ -150,8 +151,9 @@ public class GamePanel extends JPanel implements Runnable {
if(keyH.checkDrawTime) {
graphics2d.setColor(Color.white);
graphics2d.drawString("Draw Time: " + passed, 10, 400);
System.out.println("Draw Time: " + passed);
Logger.getLogger("DEBUG").log(Level.FINE, "Draw Time: " + passed);
graphics2d.drawString("FPS: " + fpsMeasure, 10, 400+tileSize);
graphics2d.drawString("Invincible: " + player.invincibleCount, 10, 400+tileSize*2);
Boot.logger.log(Level.FINE, "Draw Time: " + passed);
}
// END