Moved the balls behind the bar

This commit is contained in:
2021-11-13 00:44:20 +01:00
parent ae92c56957
commit b682ad199c
2 changed files with 2 additions and 1 deletions

View File

@ -62,12 +62,12 @@ function init() {
if(gstate==2) {
gameOver.update();
} else {
bar.update();
balls = balls.filter(ball => ball.update());
if (balls.length==0) {
if ( lives.lost() ) gstate=2;
else balls.push(new Ball(ctx, bar));
}
bar.update();
}
score.update();
lives.update();