Fix continue bug and remove legacy dialogue
parent
a2b8a12550
commit
fcf21cd48d
|
@ -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);
|
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);
|
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);
|
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("It’s 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 {
|
try {
|
||||||
// load player sprites from disk here
|
// load player sprites from disk here
|
||||||
for (int i = 0; i < 11; i++) {
|
for (int i = 0; i < 11; i++) {
|
||||||
|
@ -438,15 +424,15 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
|
||||||
public void run() {
|
public void run() {
|
||||||
if (isNewStart) {
|
if (isNewStart) {
|
||||||
LevelManager.setLevel(1);
|
LevelManager.setLevel(1);
|
||||||
isDialogue = true;
|
|
||||||
} else {
|
|
||||||
LevelManager.bombs = bombCount;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
player.resetNoSound();
|
player.resetNoSound();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
isDialogue = true;
|
||||||
|
} else {
|
||||||
|
LevelManager.bombs = bombCount;
|
||||||
|
}
|
||||||
//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.
|
//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();
|
long lastTime = System.nanoTime();
|
||||||
double amountOfTicks = 60;
|
double amountOfTicks = 60;
|
||||||
|
|
Loading…
Reference in New Issue