diff --git a/72d6a2a3kc.js b/72d6a2a3kc.js index b4e3314..3d1e4fe 100644 --- a/72d6a2a3kc.js +++ b/72d6a2a3kc.js @@ -48,29 +48,35 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { var y = GameLib.Utils.GetRandomIntInclusive(2, 10); - var apiBox = new GameLib.D3.API.Mesh(); - - apiBox.materials = [this.boxMaterial]; - - var speed = 1; + var speed = 1; + var material = null; + var mesh = null; if (meshType === 1) { mesh = this.bull.clone(); + material = this.bull.materials[0].clone(); speed = 0.2; } else if (meshType === 2) { mesh = this.star.clone(); + material = this.star.materials[0].clone(); speed = 0.3; } else if (meshType === 3) { mesh = this.burger.clone(); + material = this.burger.materials[0].clone(); speed = 0.4; } else if (meshType === 4) { mesh = this.parcel.clone(); + material = this.parcel.materials[0].clone(); speed = 0.5; } else { console.log('unknown mesh type : ' + meshType); } + mesh.materials = [material]; + + mesh.updateInstance(); + mesh.instance.visible = true; var velocity = null;