From 5aa1d1117b985a739aea61a147e25add490c4c26 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Thu, 16 Nov 2017 00:24:39 +0100 Subject: [PATCH] Update: CC - Before Render - Moorcow (to6trvr3fj.js) 116 bytes modified --- to6trvr3fj.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/to6trvr3fj.js b/to6trvr3fj.js index 62b1375..ef77e37 100644 --- a/to6trvr3fj.js +++ b/to6trvr3fj.js @@ -169,7 +169,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { enemy.burnLife = 3; enemy.burnTime = 0; enemy.explodingLife = 2; - + this.enemies.push(enemy); } @@ -343,16 +343,17 @@ if (this.mouseIsDown) { /** * This happens to trees */ - mesh.instance.material.color.sub(this.toBlack); + if (GameLib.Utils.UndefinedOrNull(mesh.userData.life)) { + mesh.userData.life = 1.2; + } - mesh.materials[0].color.r = mesh.instance.material.color.r; - mesh.materials[0].color.g = mesh.instance.material.color.g; - mesh.materials[0].color.b = mesh.instance.material.color.b; + mesh.userData.life -= 0.2; + // Don't do the color instance //mesh.materials[0].color.instance = mesh.instance.material.color; - if (mesh.instance.material.color.r <= 0) { + if (mesh.userData.life <= 0) { this.burnTree(mesh); if (mesh.instance.material.emissive) {