level2 text and display fix
This commit is contained in:
BIN
Display.class
BIN
Display.class
Binary file not shown.
@@ -7,6 +7,7 @@ public class Display {
|
||||
int tileSize = 20;
|
||||
|
||||
JFrame game = new JFrame();
|
||||
game.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
game.setSize(boardWidth, boardHeight);
|
||||
game.setVisible(true);
|
||||
game.setLocationRelativeTo(null);
|
||||
|
||||
BIN
Platformer.class
BIN
Platformer.class
Binary file not shown.
@@ -166,7 +166,7 @@ public class Platformer extends JPanel implements KeyListener, ActionListener {
|
||||
}
|
||||
|
||||
// fall out of world
|
||||
if (player.y > 2000) {
|
||||
if (player.y > 1400) {
|
||||
loadLevel(currentLevel);
|
||||
player.health--;
|
||||
}
|
||||
@@ -330,7 +330,9 @@ public class Platformer extends JPanel implements KeyListener, ActionListener {
|
||||
for (Enemy e : enemies) e.draw(g);
|
||||
for (Projectile p : projectiles) p.draw(g);
|
||||
flag.draw(g);
|
||||
|
||||
if (currentLevel == 2) {
|
||||
g.drawString("Take a leap of faith....", flag.x - 25, flag.y - 400);
|
||||
}
|
||||
// flag counter
|
||||
int amOnes = player.numAmendments % 10;
|
||||
int amTens = player.numAmendments / 10;
|
||||
|
||||
Reference in New Issue
Block a user