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