Update: CC - Bacon - Entity Loaded (2xswm1bwq8.js) 102 bytes modified

beta.r3js.org
-=yb4f310 2018-02-18 15:19:35 +01:00
parent d8e47617f6
commit e49a84b478
1 changed files with 15 additions and 16 deletions

View File

@ -1526,19 +1526,17 @@ GameLib.CustomCode.prototype.clearGrid = function() {
*/
if (this.grid instanceof Array) {
this.grid.map(
function(y) {
if (this.grid[y] instanceof Array) {
this.grid[y].map(
function(x){
if (this.grid[y][x].mesh) {
this.scene.removeObject(this.grid[y][x].mesh);
function(row) {
row.map(
function(block){
if (block.mesh) {
this.scene.removeObject(block.mesh);
}
if (this.grid[y][x].baconDisappearing) {
this.scene.removeObject(this.grid[y][x].baconDisappearing);
if (block.baconDisappearing) {
this.scene.removeObject(block.baconDisappearing);
}
}.bind(this)
)
}
}.bind(this)
)
}
@ -1552,7 +1550,8 @@ GameLib.CustomCode.prototype.clearGrid = function() {
for (var x = 0; x < GameLib.CustomCode.TETRIS_GRID_WIDTH; x++) {
this.grid[y][x] = {
value : GameLib.CustomCode.TETRIS_GRID_NOT_TAKEN,
mesh: null
mesh : null,
baconDisappearing : null
};
}
}