the observatory has an interior now and you can even walk in or out
This commit is contained in:
parent
3fcad8d95c
commit
79c4678315
5 changed files with 30 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ public class Game extends JPanel implements ActionListener {
|
|||
public static BufferedImage planetZX311Land;
|
||||
public static BufferedImage closedObservatory;
|
||||
public static BufferedImage openedObservatory;
|
||||
public static BufferedImage doorObservatory;
|
||||
|
||||
|
||||
// sets the FPS up (its 16 because 1000/60 is around 16.666 but it only accepts integers so its just rounded to 60)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class loadAssets {
|
|||
m.planetZX311Land = ImageIO.read(Game.class.getResource("/assets/planetZX311Land.png"));
|
||||
m.closedObservatory = ImageIO.read(Game.class.getResource("/assets/observatoryClosed.png"));
|
||||
m.openedObservatory = ImageIO.read(Game.class.getResource("/assets/observatoryOpened.png"));
|
||||
|
||||
m.doorObservatory = ImageIO.read(Game.class.getResource("/assets/observatoryDoor.png"));
|
||||
m.playerCurrentSprite = m.playerForward0;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ public class update {
|
|||
if (m.playerX > 290 && m.playerX < 572) { return 358; } else { return 385; }
|
||||
} else if (m.currentPlayerLocation.equals("observatoryZX311") || m.currentPlayerLocation.equals("villageEntranceZX311")) {
|
||||
return 385;
|
||||
} else if (m.currentPlayerLocation.equals("observatoryInteriorZX311")) {
|
||||
return 400;
|
||||
} else {
|
||||
return m.windowHeight-m.playerSizeY;
|
||||
}
|
||||
|
|
@ -122,6 +124,9 @@ public class update {
|
|||
} else if (m.playerX > m.windowWidth) {
|
||||
m.currentPlayerLocation = "landingPlatformZX311";
|
||||
m.playerX = m.playerSizeX;
|
||||
} else if (m.playerX > 250 && m.playerX < 390 && m.upHeld) {
|
||||
m.currentPlayerLocation = "observatoryInteriorZX311";
|
||||
m.playerX = m.playerSizeX;
|
||||
}
|
||||
} else if (m.currentPlayerLocation.equals("villageEntranceZX311")) {
|
||||
if (m.playerX < -m.playerSizeX) {
|
||||
|
|
@ -297,6 +302,29 @@ public class update {
|
|||
g.drawImage(m.closedObservatory, 100, 457 - 449, 235 * 2, 228 * 2, m);
|
||||
}
|
||||
g.drawImage(m.planetZX311Land, 0, 457, m.windowWidth, m.windowWidth/256*31, m);
|
||||
if (m.playerX > 250 && m.playerX < 390) {
|
||||
g.setColor(Color.WHITE);
|
||||
g.setFont(m.caveat.deriveFont(Font.BOLD, 30f));
|
||||
g.drawString("Press W or UP arrow key to enter the observatory.", 180, m.windowHeight-35);
|
||||
}
|
||||
} else if (m.currentPlayerLocation.equals("observatoryInteriorZX311")) {
|
||||
g.setColor(new Color(15, 15, 15));
|
||||
g.fillRect(0, 0, m.windowWidth, m.windowHeight);
|
||||
g.setColor(new Color(20, 20, 20));
|
||||
g.fillRect(0, 0, m.windowWidth, 340+128);
|
||||
if (m.playerX > 75) {
|
||||
g.drawImage(m.doorObservatory, 10, 340, 50, 128, m);
|
||||
} else {
|
||||
g.setColor(Color.black);
|
||||
g.fillRect(10, 340, 50, 127);
|
||||
g.setColor(Color.WHITE);
|
||||
g.setFont(m.caveat.deriveFont(Font.BOLD, 30f));
|
||||
g.drawString("Keep walking to the left thru the door to leave.", 180, m.windowHeight-35);
|
||||
if (m.playerX < 0) {
|
||||
m.playerX = 320;
|
||||
m.currentPlayerLocation = "observatoryZX311";
|
||||
}
|
||||
}
|
||||
} else if (m.currentPlayerLocation.equals("villageEntranceZX311")) {
|
||||
g.setColor(new Color(127, 127, 255));
|
||||
g.fillRect(0, 0, m.windowWidth, m.windowHeight);
|
||||
|
|
|
|||
BIN
src/main/resources/assets/observatoryDoor.png
Normal file
BIN
src/main/resources/assets/observatoryDoor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 405 B |
BIN
src/main/resources/assets/observatoryDoor.png~
Normal file
BIN
src/main/resources/assets/observatoryDoor.png~
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 468 B |
Loading…
Add table
Add a link
Reference in a new issue