Adding keyPressed function - reset score

This commit is contained in:
Yewon Kim 2025-05-18 23:16:27 +09:00
parent df9229cb78
commit 79b023829f

View File

@ -52,6 +52,11 @@ function mousePressed() {
function keyPressed() {
if (key === ' ') {
// reset score and targets
gun.remainingShots = TOT_SHOTS;
score.shotLeft = TOT_SHOTS;
score.score = 0;
}
}