diff --git a/a2ow5l92js.js b/a2ow5l92js.js index 5c9d7ef..51e8994 100644 --- a/a2ow5l92js.js +++ b/a2ow5l92js.js @@ -440,6 +440,9 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.scoreMesh.instance.quaternion.copy(this.camera.instance.quaternion); + this.scoreMesh.materials[0].opacity = 1.0; + this.scoreMesh.materials[0].updateInstance('opacity'); + this.scoreMesh.position = enemy.mesh.position.clone(); this.scoreMesh.updateInstance('position'); @@ -687,6 +690,12 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.totalTime += data.delta; this.enemySpawnTime += data.delta; +this.scoreMesh.materials[0].opacity -= 0.1 * data.delta; +if (this.scoreMesh.materials[0].opacity < 0) { + this.scoreMesh.materials[0].opacity = 0; +} +this.scoreMesh.materials[0].updateInstance('opacity'); + this.scene.meshes.map( function(mesh) { if (mesh.instance.material instanceof Array) {