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;