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

beta.r3js.org
-=yb4f310 2018-03-24 22:30:50 +01:00
parent a78e4c9fc4
commit 3c89b21089
1 changed files with 8 additions and 4 deletions

View File

@ -225,7 +225,8 @@ this.state = {
message : null,
gameOver : false,
muted : false,
paused : false
paused : false,
score : 0
};
GameLib.CustomCode.prototype.advanceSpeedTimer = function(delta) {
@ -1270,7 +1271,7 @@ GameLib.CustomCode.prototype.extend = function(gameObject, position, orientation
this.food.indexOf(gameObject),
1
);
gameObject.dispose();
this.grid[body.position.x][body.position.y] = body;
@ -1295,7 +1296,9 @@ GameLib.CustomCode.prototype.extend = function(gameObject, position, orientation
this.animation.translationSpeed = GameLib.CustomCode.MAX_ANIMATION_SPEED;
}
console.log('speed = ' + this.speed);
this.state.score += (1 - this.speed) * 21;
//console.log('speed = ' + this.speed);
}.bind(this);
@ -1816,7 +1819,8 @@ GameLib.Event.Subscribe(
message : null,
gameOver : false,
muted : this.state.muted,
paused : false
paused : false,
score : 0
};
GameLib.Event.Emit(