Fix continue bug and remove legacy dialogue

master
John 2022-06-19 18:53:37 -07:00
parent a2b8a12550
commit fcf21cd48d
1 changed files with 5 additions and 19 deletions

View File

@ -108,20 +108,6 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
pauseMenuExitTwo = new PauseMenu(GAME_HEIGHT/2, -20, 400, 400, GAME_WIDTH, new Font(Font.MONOSPACED, Font.BOLD, 24), "to the main menu", true);
pauseMenuResume = new PauseMenu(GAME_HEIGHT/2, -50, 400, 400, GAME_WIDTH, new Font(Font.MONOSPACED, Font.BOLD, 18), "(or press ESC to resume)", true);
dialogueMenu = new DialogueMenu(GAME_HEIGHT-100, 200, new Font(Font.MONOSPACED, Font.BOLD, 20), narratorPortrait, true);
dialogueArray.add("Did you ever hear the tragedy of Darth Plagueis The Wise?");
dialogueArray.add("I thought not.");
dialogueArray.add("Its not a story the Jedi would tell you.");
dialogueArray.add("Darth Plagueis was a Dark Lord of the Sith, " +
"so powerful and so wise he could use the Force to influence " +
"the midichlorians to create life… " +
"He had such a knowledge of the dark side that " +
"he could even keep the ones he cared about from dying. " +
"The dark side of the Force is a pathway to many abilities some consider to be unnatural. " +
"He became so powerful… the only thing he was afraid of was losing his power, " +
"which eventually, of course, he did.");
dialogueArray.add("Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep.");
dialogueArray.add("Ironic.");
dialogueArray.add("He could save others from death, but not himself.");
try {
// load player sprites from disk here
for (int i = 0; i < 11; i++) {
@ -438,15 +424,15 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
public void run() {
if (isNewStart) {
LevelManager.setLevel(1);
try {
player.resetNoSound();
} catch (IOException e) {
throw new RuntimeException(e);
}
isDialogue = true;
} else {
LevelManager.bombs = bombCount;
}
try {
player.resetNoSound();
} catch (IOException e) {
throw new RuntimeException(e);
}
//the CPU runs our game code too quickly - we need to slow it down! The following lines of code "force" the computer to get stuck in a loop for short intervals between calling other methods to update the screen.
long lastTime = System.nanoTime();
double amountOfTicks = 60;