Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 108 bytes modified
parent
bb75ab1a9c
commit
d88d1e08da
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue