working on the observatory entrance
This commit is contained in:
parent
b4851409e2
commit
3fcad8d95c
6 changed files with 10 additions and 0 deletions
|
|
@ -51,6 +51,9 @@ public class Game extends JPanel implements ActionListener {
|
||||||
public static BufferedImage playerRight1;
|
public static BufferedImage playerRight1;
|
||||||
public static BufferedImage playerRight2;
|
public static BufferedImage playerRight2;
|
||||||
public static BufferedImage planetZX311Land;
|
public static BufferedImage planetZX311Land;
|
||||||
|
public static BufferedImage closedObservatory;
|
||||||
|
public static BufferedImage openedObservatory;
|
||||||
|
|
||||||
|
|
||||||
// sets the FPS up (its 16 because 1000/60 is around 16.666 but it only accepts integers so its just rounded to 60)
|
// sets the FPS up (its 16 because 1000/60 is around 16.666 but it only accepts integers so its just rounded to 60)
|
||||||
public Timer timer = new Timer(16, this); // 60 FPS (actually more so around 62.5 but thats kinda irrelevant)
|
public Timer timer = new Timer(16, this); // 60 FPS (actually more so around 62.5 but thats kinda irrelevant)
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@ public class loadAssets {
|
||||||
m.playerRight1 = ImageIO.read(Game.class.getResource("/assets/player/playerSpriteRightWalk0.png"));
|
m.playerRight1 = ImageIO.read(Game.class.getResource("/assets/player/playerSpriteRightWalk0.png"));
|
||||||
m.playerRight2 = ImageIO.read(Game.class.getResource("/assets/player/playerSpriteRightWalk1.png"));
|
m.playerRight2 = ImageIO.read(Game.class.getResource("/assets/player/playerSpriteRightWalk1.png"));
|
||||||
m.planetZX311Land = ImageIO.read(Game.class.getResource("/assets/planetZX311Land.png"));
|
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.playerCurrentSprite = m.playerForward0;
|
m.playerCurrentSprite = m.playerForward0;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
|
||||||
|
|
@ -291,6 +291,11 @@ public class update {
|
||||||
} else if (m.currentPlayerLocation.equals("observatoryZX311")) {
|
} else if (m.currentPlayerLocation.equals("observatoryZX311")) {
|
||||||
g.setColor(new Color(127, 127, 255));
|
g.setColor(new Color(127, 127, 255));
|
||||||
g.fillRect(0, 0, m.windowWidth, m.windowHeight);
|
g.fillRect(0, 0, m.windowWidth, m.windowHeight);
|
||||||
|
if (m.playerX > 240 && m.playerX < 400) {
|
||||||
|
g.drawImage(m.openedObservatory, 100, 457 - 449, 235 * 2, 228 * 2, m);
|
||||||
|
} else {
|
||||||
|
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);
|
g.drawImage(m.planetZX311Land, 0, 457, m.windowWidth, m.windowWidth/256*31, m);
|
||||||
} else if (m.currentPlayerLocation.equals("villageEntranceZX311")) {
|
} else if (m.currentPlayerLocation.equals("villageEntranceZX311")) {
|
||||||
g.setColor(new Color(127, 127, 255));
|
g.setColor(new Color(127, 127, 255));
|
||||||
|
|
|
||||||
BIN
src/main/resources/assets/landingPlatform.png-autosave.kra
Normal file
BIN
src/main/resources/assets/landingPlatform.png-autosave.kra
Normal file
Binary file not shown.
BIN
src/main/resources/assets/observatoryClosed.png
Normal file
BIN
src/main/resources/assets/observatoryClosed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
src/main/resources/assets/observatoryOpened.png
Normal file
BIN
src/main/resources/assets/observatoryOpened.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
Loading…
Add table
Add a link
Reference in a new issue