Skip to content

Commit

Permalink
Merge pull request #44 from Adrian400811/Adrian
Browse files Browse the repository at this point in the history
Bug Fixes
  • Loading branch information
reihoron authored Jun 13, 2024
2 parents 0a53535 + c300912 commit e138e05
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 87 deletions.
7 changes: 4 additions & 3 deletions JumpBooster.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ public class JumpBooster extends Actor {

public JumpBooster() {
image = new GreenfootImage(64, 64);
image.setColor(new Color(63, 81, 181, 128));
image.fillRect(0, 0, 64, 64);
setImage(image);
}

public void addedToWorld(World w) {
image.setColor(new Color(63, 81, 181, 50));
image.drawRect(getX(), getY() + 30, 32, 2);
setImage(image);

}

public void act() {
Expand Down
12 changes: 12 additions & 0 deletions Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ public Level() {
setPaintOrder(Button.class, SuperDisplayLabel.class, Tile.class);
}

public Level(int level) {
super(1280, 720, 1, false);
saveButtonImage.scale(150, 60);
saveButton.setImage(saveButtonImage);
setPaintOrder(Button.class, SuperDisplayLabel.class, Tile.class);
setLevel(level);
}

public static void resetCoin() {
totalCoins = 0;
}
Expand Down Expand Up @@ -61,6 +69,10 @@ public void checkNext() {
}
}

public void setLevel(int level) {
Level.level = level;
}

public int[] getWorldSize() {
return worldSize;
}
Expand Down
3 changes: 2 additions & 1 deletion Level0.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public Level0() {
updateCoin(coinLabel);
resetCoin();
setHP(5);
setLevel(0);

int[][] blockGeneration = loadLevel(0);
spawnTerrain(blockGeneration);
Expand All @@ -34,7 +35,7 @@ public Level0() {
public void act() {
followPlayer(scroll, player);
updateCoin(coinLabel);
saveButton.setLocation(getWidth()-100, 40);
saveButton.setLocation(getWidth() - 100, 40);
checkSaveButton();
checkNext();
}
Expand Down
Loading

0 comments on commit e138e05

Please sign in to comment.