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

beta.r3js.org
-=yb4f310 2018-03-13 13:45:18 +01:00
parent ef0728e517
commit c822aa11df
1 changed files with 8 additions and 6 deletions

View File

@ -191,12 +191,7 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
this.snake.map(
function(body, index) {
var tempPosition = {
x : body.position.x,
y : body.position.y
};
if (index === 0) {
position.x = body.position.x;
@ -205,11 +200,18 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
body.advance(this.direction, this.rotation);
} else {
var tempPosition = {
x : body.position.x,
y : body.position.y
};
body.position.x = position.x;
body.position.y = position.y;
position.x = tempPosition.x;
position.y = tempPosition.y;
}
body.applyToMesh();