level 6
This commit is contained in:
@@ -13,11 +13,12 @@ public class Platformer extends JPanel implements KeyListener, ActionListener {
|
||||
static final Color playerColor = Color.RED;
|
||||
static final Color tileColor = Color.BLUE;
|
||||
static final Color SKY = new Color(135, 206, 235);
|
||||
static final Color NIGHT_SKY = new Color(4, 26, 64);
|
||||
static final int FRICTION = 1;
|
||||
static final int MAXYVELO = 15;
|
||||
static final int MAXXVELO = 5;
|
||||
static final int totalLevels = 10;
|
||||
static int[] numAm = {4, 5, 10, 18, 6, 0, 0, 0, 0, 0};
|
||||
static int[] numAm = {4, 5, 10, 18, 6, 6, 0, 0, 0, 0};
|
||||
|
||||
// game objects
|
||||
Player player;
|
||||
@@ -347,6 +348,13 @@ public class Platformer extends JPanel implements KeyListener, ActionListener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentLevel == 6) {
|
||||
this.setBackground(NIGHT_SKY);
|
||||
}
|
||||
if (currentLevel == 7) {
|
||||
this.setBackground(SKY);
|
||||
}
|
||||
|
||||
g.translate(-cameraX, -cameraY);
|
||||
|
||||
player.draw(g);
|
||||
|
||||
Reference in New Issue
Block a user