Update: CC - Bacon - Entity Loaded (2xswm1bwq8.js) 102 bytes modified
parent
d8e47617f6
commit
e49a84b478
|
@ -1504,7 +1504,7 @@ GameLib.CustomCode.prototype.stopBlock = function() {
|
||||||
|
|
||||||
GameLib.CustomCode.prototype.endGame = function() {
|
GameLib.CustomCode.prototype.endGame = function() {
|
||||||
|
|
||||||
GameLib.Event.Emit(
|
GameLib.Event.Emit(
|
||||||
GameLib.Event.GAME_OVER,
|
GameLib.Event.GAME_OVER,
|
||||||
{
|
{
|
||||||
score: this.score,
|
score: this.score,
|
||||||
|
@ -1526,19 +1526,17 @@ GameLib.CustomCode.prototype.clearGrid = function() {
|
||||||
*/
|
*/
|
||||||
if (this.grid instanceof Array) {
|
if (this.grid instanceof Array) {
|
||||||
this.grid.map(
|
this.grid.map(
|
||||||
function(y) {
|
function(row) {
|
||||||
if (this.grid[y] instanceof Array) {
|
row.map(
|
||||||
this.grid[y].map(
|
function(block){
|
||||||
function(x){
|
if (block.mesh) {
|
||||||
if (this.grid[y][x].mesh) {
|
this.scene.removeObject(block.mesh);
|
||||||
this.scene.removeObject(this.grid[y][x].mesh);
|
}
|
||||||
}
|
if (block.baconDisappearing) {
|
||||||
if (this.grid[y][x].baconDisappearing) {
|
this.scene.removeObject(block.baconDisappearing);
|
||||||
this.scene.removeObject(this.grid[y][x].baconDisappearing);
|
}
|
||||||
}
|
}.bind(this)
|
||||||
}.bind(this)
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1551,8 +1549,9 @@ GameLib.CustomCode.prototype.clearGrid = function() {
|
||||||
this.grid[y] = [];
|
this.grid[y] = [];
|
||||||
for (var x = 0; x < GameLib.CustomCode.TETRIS_GRID_WIDTH; x++) {
|
for (var x = 0; x < GameLib.CustomCode.TETRIS_GRID_WIDTH; x++) {
|
||||||
this.grid[y][x] = {
|
this.grid[y][x] = {
|
||||||
value: GameLib.CustomCode.TETRIS_GRID_NOT_TAKEN,
|
value : GameLib.CustomCode.TETRIS_GRID_NOT_TAKEN,
|
||||||
mesh: null
|
mesh : null,
|
||||||
|
baconDisappearing : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue