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

beta.r3js.org
-=yb4f310 2018-03-13 14:03:16 +01:00
parent 1b28546c55
commit a246365673
1 changed files with 5 additions and 5 deletions

View File

@ -190,7 +190,7 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
} }
var position = {x:0, y:0}; var position = {x:0, y:0};
var rotation = 0; //var rotation = 0;
this.snake.map( this.snake.map(
function(body, index) { function(body, index) {
@ -200,7 +200,7 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
position.x = body.position.x; position.x = body.position.x;
position.y = body.position.y; position.y = body.position.y;
rotation = body.rotation; //rotation = body.rotation;
body.advance( body.advance(
this.state.direction, this.state.direction,
@ -214,17 +214,17 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
y : body.position.y y : body.position.y
}; };
var tempRotation = body.rotation; //var tempRotation = body.rotation;
body.position.x = position.x; body.position.x = position.x;
body.position.y = position.y; body.position.y = position.y;
body.rotation = rotation; //body.rotation = rotation;
position.x = tempPosition.x; position.x = tempPosition.x;
position.y = tempPosition.y; position.y = tempPosition.y;
rotation = tempRotation; //rotation = tempRotation;
} }