Merge remote-tracking branch 'origin/master'

master
bob 2022-06-20 11:30:06 -04:00
commit 52800c5a9b
3 changed files with 16 additions and 13 deletions

View File

@ -1,2 +1 @@
Have you heard of the tragedy of
Darth Charlie the Wise?
$Empty

View File

@ -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

View File

@ -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) {