added path finding algorithm

This commit is contained in:
2025-12-12 21:33:52 +01:00
parent a89838eb38
commit 4ab53ceab9
5 changed files with 249 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
package de.miaurizius.jgame2d.core;
import de.miaurizius.jgame2d.ai.PathFinder;
import de.miaurizius.jgame2d.core.enums.GameState;
import de.miaurizius.jgame2d.core.enums.Map;
import de.miaurizius.jgame2d.core.handlers.*;
@@ -33,7 +34,7 @@ public class GamePanel extends JPanel implements Runnable {
int fScreenWidth = screenWidth;
int fScreenHeight = screenHeight;
BufferedImage tempScreen;
Graphics2D fg2;
public Graphics2D fg2;
// WORLD SETTINGS
public final int maxWorldCol = 50;
@@ -54,6 +55,7 @@ public class GamePanel extends JPanel implements Runnable {
public Sound sfx = new Sound();
public Sound music = new Sound();
public Config config = new Config(this);
public PathFinder pFinder = new PathFinder(this);
Thread gameThread;
// ENTITY AND OBJECT