Added sprites to the bricks and touch control

This commit is contained in:
2021-11-17 20:12:25 +01:00
parent bc3ef31728
commit 44e93e5c6d
9 changed files with 83 additions and 30 deletions

View File

@ -4,28 +4,28 @@ class Levels {
switch (+lvl) {
case 1:
map = [].concat(
this.row(0, [1, 0, 1, 0, 0, 1, 0, 1]),
this.row(1, [1, 1, 1, 1, 1, 1, 1, 1]),
this.row(3, [0, 1, 1, 1, 1, 1, 1, 0]),
this.row(4, [1, 1, 1, 1, 1, 1, 1, 1])
this.row(0, [0, 0, 1, 0, 1, 0, 0, 1, 0, 1]),
this.row(1, [0, 0, 1, 1, 1, 1, 1, 1, 1, 1]),
this.row(3, [0, 0, 0, 1, 1, 1, 1, 1, 1, 0]),
this.row(4, [0, 0, 1, 1, 1, 1, 1, 1, 1, 1])
);
break;
case 2:
map = [].concat(
this.row(0, [3, 3, 3, 0, 3, 3, 0, 0]),
this.row(1, [0, 0, 3, 0, 3, 0, 3, 0]),
this.row(2, [0, 0, 3, 0, 3, 0, 3, 0]),
this.row(3, [3, 0, 3, 0, 3, 0, 3, 0]),
this.row(4, [0, 3, 3, 0, 3, 3, 0, 0])
this.row(0, [0, 0, 3, 3, 3, 0, 3, 3, 0, 0]),
this.row(1, [0, 0, 0, 0, 3, 0, 3, 0, 3, 0]),
this.row(2, [0, 0, 0, 0, 3, 0, 3, 0, 3, 0]),
this.row(3, [0, 0, 3, 0, 3, 0, 3, 0, 3, 0]),
this.row(4, [0, 0, 0, 3, 3, 0, 3, 3, 0, 0])
);
break;
default:
map = [].concat(
this.row(0, [1, 3, 1, 3, 1, 3, 1, 3]),
this.row(1, [3, 1, 3, 1, 3, 1, 3, 1]),
this.row(2, [1, 3, 1, 3, 1, 3, 1, 3]),
this.row(3, [3, 1, 3, 1, 3, 1, 3, 1]),
this.row(4, [1, 3, 1, 3, 1, 3, 1, 3])
this.row(0, [2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 2]),
this.row(1, [2, 3, 1, 3, 1, 3, 1, 3, 1, 3, 2]),
this.row(2, [2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 2]),
this.row(3, [2, 3, 1, 3, 1, 3, 1, 3, 1, 3, 2]),
this.row(4, [2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 2])
);
break;
}