Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 220 bytes modified
parent
4e6179589d
commit
0f87248120
|
@ -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.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;
|
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.visible = true;
|
||||||
|
|
||||||
mesh.updateInstance('position');
|
mesh.updateInstance('position');
|
||||||
|
mesh.updateInstance('scale');
|
||||||
mesh.updateInstance('visible');
|
mesh.updateInstance('visible');
|
||||||
|
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
Loading…
Reference in New Issue