From 77d3d0de621fa540d33315944dc75cf82d1bcdd8 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 19 Mar 2018 10:23:48 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 129 bytes modified --- 21g30t1e75.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/21g30t1e75.js b/21g30t1e75.js index 0f2a16d..4805237 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -52,7 +52,8 @@ this.imagePatty = GameLib.EntityManager.Instance.findComponentById('4lf0fw24su /** * Other Objects (Scene) */ -this.scene = GameLib.EntityManager.Instance.findComponentById('pllp034hsj'); +this.scene = GameLib.EntityManager.Instance.findComponentById('pllp034hsj'); +this.animation = GameLib.EntityManager.Instance.findComponentById('8kb7utb2fn'); /** * Game objects @@ -144,7 +145,9 @@ GameLib.CustomCode.SnakeBody = function( } this.mesh = mesh.clone(); this.mesh.useQuaternion = false; - + + this.animation.meshes.push(this.mesh); + if (GameLib.Utils.UndefinedOrNull(position)) { position = { x : Math.round(GameLib.CustomCode.GRID_WIDTH / 2), @@ -185,7 +188,7 @@ GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function() { /** * TODO: We don't update instance position - animation should do this */ - this.mesh.updateInstance('position'); + // this.mesh.updateInstance('position'); this.mesh.updateInstance('rotation'); }