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