Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 645 bytes modified

beta.r3js.org
-=yb4f310 2018-03-19 10:17:01 +01:00
parent 72405eafc0
commit d2dbd76497
1 changed files with 4 additions and 30 deletions

View File

@ -171,30 +171,6 @@ GameLib.CustomCode.SnakeBody = function(
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() {
this.mesh.position.x = this.position.x + GameLib.CustomCode.GRID_OFFSET_X;
@ -326,9 +302,7 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
body.mesh = this.meshBreadCorner.clone();
}
//body.orientation = this.snake[index - 1].orientation;
}
}
@ -371,9 +345,9 @@ GameLib.Event.Subscribe(
*/
this.snake.map(
function(body) {
body.geometry = null;
body.materials = null;
body.remove();
body.mesh.geometry = null;
body.mesh.materials = null;
body.mesh.remove();
}
)