From 4c96d706585a27d9099b278858785525d33b4329 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Wed, 21 Mar 2018 10:23:46 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 49 bytes modified --- 21g30t1e75.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/21g30t1e75.js b/21g30t1e75.js index ad45239..15025bb 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -156,9 +156,10 @@ GameLib.CustomCode.prototype.createGameMesh = function(image, visible) { var mesh = new GameLib.D3.Mesh( this.runtime.graphics, { - geometry : this.geometryBody, - materials : [this.createMaterial(image)], - visible : visible + geometry : this.geometryBody, + materials : [this.createMaterial(image)], + visible : visible, + useQuaternion : false } ) @@ -263,9 +264,7 @@ GameLib.CustomCode.SnakeBody = function( if (GameLib.Utils.UndefinedOrNull(mesh)) { throw new Error('no mesh specified'); } - this.mesh = mesh.clone(); - this.mesh.useQuaternion = false; - this.mesh.visible = true; + this.mesh = mesh; this.mesh.position.z = GameLib.CustomCode.SnakeBody.LastZ; GameLib.CustomCode.SnakeBody.LastZ += 0.1; @@ -561,7 +560,7 @@ GameLib.Event.Subscribe( this.snake = [ new GameLib.CustomCode.SnakeBody( - this.meshBreadHead, + this.createGameMesh(this.imageBreadHead), { x : 4, y : 4 @@ -569,7 +568,7 @@ GameLib.Event.Subscribe( 0 ), new GameLib.CustomCode.SnakeBody( - this.meshBreadPatty, + this.createGameMesh(this.imageBreadPatty), { x : 4, y : 3 @@ -577,7 +576,7 @@ GameLib.Event.Subscribe( 0 ), new GameLib.CustomCode.SnakeBody( - this.meshBreadPatty, + this.createGameMesh(this.imageBreadPatty), { x : 4, y : 2 @@ -585,7 +584,7 @@ GameLib.Event.Subscribe( 0 ), new GameLib.CustomCode.SnakeBody( - this.meshBreadTail, + this.createGameMesh(this.imageBreadTail), { x : 4, y : 1