Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 438 bytes modified
parent
ea6f5fa7c0
commit
f2550aa3bd
|
@ -937,14 +937,7 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if (this.state.eating === true) {
|
|
||||||
body.applyToMesh();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (index > 0) {
|
|
||||||
|
|
||||||
temp = {
|
temp = {
|
||||||
position : {
|
position : {
|
||||||
|
@ -955,6 +948,8 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
||||||
flip : body.flip
|
flip : body.flip
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.state.eating === false) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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)
|
||||||
*/
|
*/
|
||||||
|
@ -995,9 +990,11 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
||||||
body.mesh.updateInstance('position');
|
body.mesh.updateInstance('position');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (body.orientation !== temp.orientation) {
|
}
|
||||||
|
|
||||||
if ((index ) < this.snake.length) {
|
if (backup.orientation !== temp.orientation) {
|
||||||
|
|
||||||
|
// if ((index ) < this.snake.length) {
|
||||||
/**
|
/**
|
||||||
* Our orientation changed - we should make a corner
|
* Our orientation changed - we should make a corner
|
||||||
*/
|
*/
|
||||||
|
@ -1038,7 +1035,7 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
||||||
body.mesh.visible = true;
|
body.mesh.visible = true;
|
||||||
|
|
||||||
body.mesh.updateInstance('visible');
|
body.mesh.updateInstance('visible');
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue