Adding keyPressed function - reset score
This commit is contained in:
parent
df9229cb78
commit
79b023829f
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user