From b7c6ea7fef8b117c5a1368226aabf387ef9a2daf Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 19 Mar 2018 14:19:29 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 147 bytes modified --- 21g30t1e75.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/21g30t1e75.js b/21g30t1e75.js index d5e239d..0467f1e 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -149,6 +149,9 @@ GameLib.CustomCode.SnakeBody = function( this.mesh = mesh.clone(); this.mesh.useQuaternion = false; + this.mesh.position.z = GameLib.CustomCode.SnakeBody.LastZ; + GameLib.CustomCode.SnakeBody.LastZ += 0.1; + if (GameLib.Utils.UndefinedOrNull(position)) { position = { x : Math.round(GameLib.CustomCode.GRID_WIDTH / 2), @@ -180,6 +183,8 @@ GameLib.CustomCode.SnakeBody = function( this.applyToMesh(); }; +GameLib.CustomCode.SnakeBody.LastZ = 0; + GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function() { this.mesh.position.x = this.position.x + GameLib.CustomCode.GRID_OFFSET_X;