Skip to content

Commit

Permalink
Resetting score post-game-over
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanamisra committed Jun 27, 2024
1 parent 2cded3b commit 8de3352
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/Game.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ function Game() {
monsterImages.push(await p.loadImage(zombie));
monsterImages.push(await p.loadImage(goblin));
monsterImages.push(await p.loadImage(vampire));
score = 0;
timer = 42;
}

p.setup = function() {
Expand Down Expand Up @@ -138,7 +140,7 @@ function Game() {

p.draw = function () {
p.background(bgImage);
if(gameOver === false) {
// if(gameOver === false) {
Engine.update(engine);

rightWall.show(p);
Expand Down Expand Up @@ -173,7 +175,7 @@ function Game() {
score += 1;
}
}
}
// }
}
}

Expand Down

0 comments on commit 8de3352

Please sign in to comment.