Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 108 bytes modified

beta.r3js.org
-=yb4f310 2018-03-21 14:08:36 +01:00
parent bb75ab1a9c
commit d88d1e08da
1 changed files with 4 additions and 1 deletions

View File

@ -244,7 +244,10 @@ GameLib.CustomCode.prototype.createFood = function(delta) {
)
if (this.food.length >= GameLib.CustomCode.MAX_FOOD_ITEMS) {
this.food.shift();
var deleteme = this.food.shift();
deleteme.mesh.geometry = null;
deleteme.mesh.materials = null;
deleteme.mesh.remove();
}
this.rebuildGrid();