Skip to content

Commit

Permalink
115 - fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lijwent committed Dec 13, 2017
1 parent 30effde commit eac57a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/main/game/actor/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ private void restart() {
startCheckpoint = null;
lastCheckpoint = null;
savedScore = 0;
score = 0;
reset();
}

Expand All @@ -248,7 +249,7 @@ private void reset() {
messageDisplayed = "";
respawnTimer = 0;
saveLoaded = null;
resetScore();
score = savedScore;
}

/** Spawn a new {@linkplain Bike} at the right place */
Expand All @@ -261,12 +262,6 @@ private void spawnBike() {

}

// score management
/** Reset the score */
private void resetScore() {
score = 0;
}

public void addToScore(int score) {
this.score += score;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/game/actor/weapons/Weapon.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ protected boolean hasShot() {
*/
public void addAmmo(int quantity) {
this.ammoCount += quantity;
this.amoNumber.setText(this.amoText + this.ammoCount);
this.amoNumber.setText(this.ammoCount + this.amoText);
}

/** @return whether this weapon is deployed */
Expand Down

0 comments on commit eac57a6

Please sign in to comment.