From 0f8724812036264db5acca7a70fcba1d9092fbbe Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Wed, 21 Mar 2018 12:08:10 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 220 bytes modified --- 21g30t1e75.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/21g30t1e75.js b/21g30t1e75.js index 904ef69..df36d79 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -214,9 +214,16 @@ GameLib.CustomCode.prototype.createFood = function(delta) { mesh.position.x = (positionX * GameLib.CustomCode.BODY_SCALE_X) + GameLib.CustomCode.GRID_OFFSET_X; mesh.position.y = (positionY * GameLib.CustomCode.BODY_SCALE_Y) + GameLib.CustomCode.GRID_OFFSET_Y; + /** + * We apply the scale to the mesh too - since they appear too big when normal + */ + mesh.scale.x = GameLib.CustomCode.BODY_SCALE_X; + mesh.scale.y = GameLib.CustomCode.BODY_SCALE_Y; + mesh.visible = true; mesh.updateInstance('position'); + mesh.updateInstance('scale'); mesh.updateInstance('visible'); }.bind(this);