Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 72 bytes modified
parent
ef7773bdec
commit
dc9adaaed6
|
@ -915,15 +915,9 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
|||
|
||||
backup.orientation = body.orientation;
|
||||
backup.flip = body.flip;
|
||||
}
|
||||
|
||||
if (this.state.eating === true) {
|
||||
body.applyToMesh();
|
||||
return;
|
||||
}
|
||||
|
||||
if (index > 0) {
|
||||
|
||||
} else {
|
||||
|
||||
temp = {
|
||||
position : {
|
||||
x : body.position.x,
|
||||
|
@ -933,6 +927,8 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
|||
flip : body.flip
|
||||
}
|
||||
|
||||
if (!state.turning) {
|
||||
|
||||
/**
|
||||
* Create a new empty object at the current grid position (free it up)
|
||||
*/
|
||||
|
@ -945,13 +941,14 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
|||
body.position.y = backup.position.y;
|
||||
body.orientation = backup.orientation;
|
||||
body.flip = backup.flip;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the grid with our new body
|
||||
*/
|
||||
this.grid[body.position.x][body.position.y] = body;
|
||||
|
||||
if (body.backupMesh) {
|
||||
if (body.backupMesh && !this.state.turning) {
|
||||
/**
|
||||
* We used to be a corner, change back
|
||||
* @type {null}
|
||||
|
|
Loading…
Reference in New Issue