Merge remote-tracking branch 'origin/master'
commit
52800c5a9b
|
@ -1,2 +1 @@
|
||||||
Have you heard of the tragedy of
|
$Empty
|
||||||
Darth Charlie the Wise?
|
|
|
@ -49,6 +49,7 @@ public class LevelManager implements Serializable {
|
||||||
try {
|
try {
|
||||||
MapReader.inputMap(filePath);
|
MapReader.inputMap(filePath);
|
||||||
if (!hasDied) {
|
if (!hasDied) {
|
||||||
|
if (!(MapReader.inputDialogue(filePath)[0].equals("$Empty"))) {
|
||||||
GameFrame.game.dialogueArray = new ArrayList<String>(Arrays.asList(MapReader.inputDialogue(filePath)));
|
GameFrame.game.dialogueArray = new ArrayList<String>(Arrays.asList(MapReader.inputDialogue(filePath)));
|
||||||
if (GameFrame.game.dialogueArray.get(0).contains("$Villain")) {
|
if (GameFrame.game.dialogueArray.get(0).contains("$Villain")) {
|
||||||
GameFrame.game.dialogueArray.remove(0);
|
GameFrame.game.dialogueArray.remove(0);
|
||||||
|
@ -60,9 +61,8 @@ 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
|
// reset signs
|
||||||
GameFrame.game.tutorialSign = new ArrayList<WallSign>();
|
|
||||||
GameFrame.game.loreSign = new ArrayList<WallSign>();
|
|
||||||
GameFrame.game.tutorialSign.clear();
|
GameFrame.game.tutorialSign.clear();
|
||||||
GameFrame.game.loreSign.clear();
|
GameFrame.game.loreSign.clear();
|
||||||
// temporary boolean, so only declared here
|
// temporary boolean, so only declared here
|
||||||
|
|
|
@ -161,6 +161,8 @@ public class MenuPanel extends JPanel implements Runnable, KeyListener{
|
||||||
if(textBoxArray.get(currentBox).id.contains("game")){
|
if(textBoxArray.get(currentBox).id.contains("game")){
|
||||||
gameStart = true;
|
gameStart = true;
|
||||||
}
|
}
|
||||||
|
// always unpause game, no matter what screen is navigated to
|
||||||
|
GameFrame.game.isPaused = false;
|
||||||
// logic for different screens starts here
|
// logic for different screens starts here
|
||||||
if (textBoxArray.get(currentBox).id.equals("game-start")) {
|
if (textBoxArray.get(currentBox).id.equals("game-start")) {
|
||||||
try {
|
try {
|
||||||
|
@ -170,6 +172,8 @@ public class MenuPanel extends JPanel implements Runnable, KeyListener{
|
||||||
GameFrame.game.player.yVelocity = 0;
|
GameFrame.game.player.yVelocity = 0;
|
||||||
GameFrame.game.map = new Tile[1000][18];
|
GameFrame.game.map = new Tile[1000][18];
|
||||||
GameFrame.game = new GamePanel(GameFrame.main); //run GamePanel constructor
|
GameFrame.game = new GamePanel(GameFrame.main); //run GamePanel constructor
|
||||||
|
GameFrame.game.isContinue = true;
|
||||||
|
textBoxArray.add(continueGame);
|
||||||
GameFrame.game.startThread();
|
GameFrame.game.startThread();
|
||||||
GameFrame.main.add(GameFrame.game, "game", 0);
|
GameFrame.main.add(GameFrame.game, "game", 0);
|
||||||
} catch (IOException | SpriteException | UnsupportedAudioFileException | LineUnavailableException ex) {
|
} catch (IOException | SpriteException | UnsupportedAudioFileException | LineUnavailableException ex) {
|
||||||
|
|
Loading…
Reference in New Issue