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

beta.r3js.org
-=yb4f310 2018-03-21 14:07:35 +01:00
parent 3d969c1568
commit bb75ab1a9c
1 changed files with 6 additions and 0 deletions

View File

@ -243,6 +243,12 @@ GameLib.CustomCode.prototype.createFood = function(delta) {
}
)
if (this.food.length >= GameLib.CustomCode.MAX_FOOD_ITEMS) {
this.food.shift();
}
this.rebuildGrid();
}.bind(this);