Fix sign bug
parent
2e3b2eb90b
commit
a81c4e21c4
|
@ -52,6 +52,9 @@ public class LevelManager implements Serializable {
|
||||||
GameFrame.game.dialogueMenu.frameCounter = 0;
|
GameFrame.game.dialogueMenu.frameCounter = 0;
|
||||||
GameFrame.game.isDialogue = true;
|
GameFrame.game.isDialogue = true;
|
||||||
}
|
}
|
||||||
|
// reset signs
|
||||||
|
GameFrame.game.tutorialSign = new ArrayList<WallSign>();
|
||||||
|
GameFrame.game.loreSign = new ArrayList<WallSign>();
|
||||||
// temporary boolean, so only declared here
|
// temporary boolean, so only declared here
|
||||||
boolean stillTutorial = true;
|
boolean stillTutorial = true;
|
||||||
for (String[] sA: MapReader.inputSign(filePath)) {
|
for (String[] sA: MapReader.inputSign(filePath)) {
|
||||||
|
|
|
@ -307,6 +307,13 @@ public class Player extends GenericSprite {
|
||||||
mouseY = e.getY();
|
mouseY = e.getY();
|
||||||
if(e.getButton()==MouseEvent.BUTTON1) {
|
if(e.getButton()==MouseEvent.BUTTON1) {
|
||||||
leftMouseDown = true;
|
leftMouseDown = true;
|
||||||
|
if (holdingSteel && ((GameFrame.game.map[x][y] == null || GameFrame.game.map[x][y].replaceAble) && canPlaceSteel)) {
|
||||||
|
Tile temp = GameFrame.game.map[x][y];
|
||||||
|
GameFrame.game.map[x][y] = new SingleTile(x * Tile.length - (GamePanel.GAME_WIDTH / 2), y * Tile.length, new BufferedImageWrapper(("img/tiles/boxes/steel.png")));
|
||||||
|
GameFrame.game.map[x][y].movable = true;
|
||||||
|
GameFrame.game.map[x][y].previousBlock = temp;
|
||||||
|
holdingSteel = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(e.getButton()==MouseEvent.BUTTON3) {
|
if(e.getButton()==MouseEvent.BUTTON3) {
|
||||||
int x = (mouseX + GameFrame.game.camera.x + GamePanel.GAME_WIDTH / 2) / Tile.length;
|
int x = (mouseX + GameFrame.game.camera.x + GamePanel.GAME_WIDTH / 2) / Tile.length;
|
||||||
|
|
Loading…
Reference in New Issue