Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 645 bytes modified
parent
72405eafc0
commit
d2dbd76497
|
@ -171,30 +171,6 @@ GameLib.CustomCode.SnakeBody = function(
|
||||||
this.applyToMesh();
|
this.applyToMesh();
|
||||||
};
|
};
|
||||||
|
|
||||||
// GameLib.CustomCode.SnakeBody.prototype.restoreBackup = function() {
|
|
||||||
//
|
|
||||||
// if (!this.backup) {
|
|
||||||
// console.warn('no backup to restore');
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// this.mesh.geometry = null;
|
|
||||||
// this.mesh.materials = null;
|
|
||||||
// this.mesh.remove();
|
|
||||||
//
|
|
||||||
// this.mesh = this.backup.mesh;
|
|
||||||
// this.mesh.visible = true;
|
|
||||||
// this.mesh.updateInstance('visible');
|
|
||||||
//
|
|
||||||
// this.orientation = this.backup.orientation;
|
|
||||||
//
|
|
||||||
// this.backup = null;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * We don't restore the position because the position will have changed
|
|
||||||
// */
|
|
||||||
// }
|
|
||||||
|
|
||||||
GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function() {
|
GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function() {
|
||||||
|
|
||||||
this.mesh.position.x = this.position.x + GameLib.CustomCode.GRID_OFFSET_X;
|
this.mesh.position.x = this.position.x + GameLib.CustomCode.GRID_OFFSET_X;
|
||||||
|
@ -327,8 +303,6 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
||||||
body.mesh = this.meshBreadCorner.clone();
|
body.mesh = this.meshBreadCorner.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
//body.orientation = this.snake[index - 1].orientation;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,9 +345,9 @@ GameLib.Event.Subscribe(
|
||||||
*/
|
*/
|
||||||
this.snake.map(
|
this.snake.map(
|
||||||
function(body) {
|
function(body) {
|
||||||
body.geometry = null;
|
body.mesh.geometry = null;
|
||||||
body.materials = null;
|
body.mesh.materials = null;
|
||||||
body.remove();
|
body.mesh.remove();
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue