Checking the levels

This commit is contained in:
2021-11-15 00:10:53 +01:00
parent 7493713529
commit 7cf0bfbdbd
3 changed files with 43 additions and 28 deletions

View File

@ -3,6 +3,9 @@ class GamePlay extends Board {
super(ctx, key);
this.controls = {
'KeyS': ()=>{
this.nextLevel(++this.level);
},
'KeyX': ()=>{
let b = new Ball();
b.update(this.ctx, this.bar.x + this.bar.w/2, this.bar.y);