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