Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 10 bytes modified
parent
1b28546c55
commit
a246365673
|
@ -190,7 +190,7 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
|||
}
|
||||
|
||||
var position = {x:0, y:0};
|
||||
var rotation = 0;
|
||||
//var rotation = 0;
|
||||
|
||||
this.snake.map(
|
||||
function(body, index) {
|
||||
|
@ -200,7 +200,7 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
|||
position.x = body.position.x;
|
||||
position.y = body.position.y;
|
||||
|
||||
rotation = body.rotation;
|
||||
//rotation = body.rotation;
|
||||
|
||||
body.advance(
|
||||
this.state.direction,
|
||||
|
@ -214,17 +214,17 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
|||
y : body.position.y
|
||||
};
|
||||
|
||||
var tempRotation = body.rotation;
|
||||
//var tempRotation = body.rotation;
|
||||
|
||||
body.position.x = position.x;
|
||||
body.position.y = position.y;
|
||||
|
||||
body.rotation = rotation;
|
||||
//body.rotation = rotation;
|
||||
|
||||
position.x = tempPosition.x;
|
||||
position.y = tempPosition.y;
|
||||
|
||||
rotation = tempRotation;
|
||||
//rotation = tempRotation;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue