Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 262 bytes modified
parent
0c22706677
commit
7429de0943
|
@ -1160,9 +1160,13 @@ GameLib.CustomCode.prototype.extend = function(gameObject, position, orientation
|
||||||
this.gameOver(true);
|
this.gameOver(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.extendSpeedGrain = (GameLib.CustomCode.SPEED_INITIAL - GameLib.CustomCode.MAX_SPEED) / ((GameLib.CustomCode.GRID_WIDTH * GameLib.CustomCode.GRID_HEIGHT) - this.snake.length)
|
||||||
|
|
||||||
this.speed -= this.extendSpeedGrain;
|
this.speed -= this.extendSpeedGrain;
|
||||||
|
|
||||||
if (this.speed <
|
if (this.speed < GameLib.CustomCode.MAX_SPEED) {
|
||||||
|
this.speed = GameLib.CustomCode.MAX_SPEED;
|
||||||
|
}
|
||||||
|
|
||||||
console.log('speed = ' + this.speed);
|
console.log('speed = ' + this.speed);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue