From d2dbd76497247d2ed51840d77f6ad06376ebf4b5 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 19 Mar 2018 10:17:01 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 645 bytes modified --- 21g30t1e75.js | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/21g30t1e75.js b/21g30t1e75.js index 7e4bcd6..0f2a16d 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -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(); } )