Moved the balls behind the bar
This commit is contained in:
2
index.js
2
index.js
@ -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();
|
||||
|
Reference in New Issue
Block a user