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'); }