added shortcut to instantly reload map
This commit is contained in:
@@ -27,6 +27,7 @@ public class GamePanel extends JPanel implements Runnable {
|
||||
// WORLD SETTINGS
|
||||
public final int maxWorldCol = 50;
|
||||
public final int maxWorldRow = 50;
|
||||
public final String currentMap = "testmap2";
|
||||
|
||||
//FPS
|
||||
final int FPS = 60;
|
||||
|
||||
@@ -52,6 +52,7 @@ public class KeyHandler implements KeyListener {
|
||||
|
||||
// DEBUG OPTIONS
|
||||
case KeyEvent.VK_T -> debug = !debug;
|
||||
case KeyEvent.VK_R -> panel.tileM.loadMap(panel.currentMap);
|
||||
|
||||
// GAME STATES
|
||||
case KeyEvent.VK_ESCAPE -> panel.gameState = GameState.PAUSE;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class TileManager {
|
||||
tile = new Tile[50];
|
||||
mapTileNum = new int[panel.maxWorldCol][panel.maxWorldRow];
|
||||
getTileImage();
|
||||
loadMap("testmap2");
|
||||
loadMap(panel.currentMap);
|
||||
}
|
||||
|
||||
public void initializeTile(int i, String name, boolean col) {
|
||||
|
||||
Reference in New Issue
Block a user