From 28c6d527321d2844b4ebc524ed6cbfb8fdd343e6 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 23 Mar 2018 15:27:36 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 89 bytes modified --- 21g30t1e75.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/21g30t1e75.js b/21g30t1e75.js index 48faef3..7d92a6a 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -638,7 +638,8 @@ GameLib.CustomCode.prototype.createGameObject = function( gameObject.applyToMesh(true); break; case GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY: - gameObject = new GameLib.CustomCode.SnakeBody( + + gameObject = new GameLib.CustomCode.SnakeBody( type, mesh, position, @@ -648,6 +649,9 @@ GameLib.CustomCode.prototype.createGameObject = function( isTail ) gameObject.applyToMesh(true); + + this.animation.meshes.push(gameObject.mesh); + break; default: throw new Error('unhandled object type: ' + objectType); @@ -817,12 +821,6 @@ GameLib.CustomCode.SnakeBody = function( isTail = false; } this.isTail = isTail; - - this.applyToMesh(); - - var animation = GameLib.EntityManager.Instance.findComponentById('8kb7utb2fn'); - - animation.meshes.push(this.mesh); }; GameLib.CustomCode.SnakeBody.prototype = Object.create(GameLib.CustomCode.GameObject.prototype);