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

beta.r3js.org
-=yb4f310 2018-03-19 14:19:29 +01:00
parent 3c6316fa0a
commit b7c6ea7fef
1 changed files with 5 additions and 0 deletions

View File

@ -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;