Update: CC - Before Render - Moorcow (orfy8cilgg.js) 45 bytes modified
parent
5293a38fac
commit
77a24fdb5b
|
@ -797,6 +797,7 @@ if (this.mouseIsDown)
|
||||||
*/
|
*/
|
||||||
if (GameLib.Utils.UndefinedOrNull(mesh.burnLife)) {
|
if (GameLib.Utils.UndefinedOrNull(mesh.burnLife)) {
|
||||||
mesh.burnLife = 1;
|
mesh.burnLife = 1;
|
||||||
|
mesh.burning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mesh.burning) {
|
if (!mesh.burning) {
|
||||||
|
@ -804,19 +805,18 @@ if (this.mouseIsDown)
|
||||||
mesh.burnLife -= data.delta * 2;
|
mesh.burnLife -= data.delta * 2;
|
||||||
|
|
||||||
if (mesh.burnLife <= 0) {
|
if (mesh.burnLife <= 0) {
|
||||||
|
mesh.burnLife = 0;
|
||||||
this.burnTree(mesh);
|
this.burnTree(mesh);
|
||||||
|
}
|
||||||
|
|
||||||
if (mesh.instance.material.emissive) {
|
if (mesh.instance.material.emissive) {
|
||||||
mesh.instance.material.emissive.setRGB(
|
mesh.instance.material.emissive.setRGB(
|
||||||
1 - mesh.burnLife,
|
1 - mesh.burnLife,
|
||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
|
|
Loading…
Reference in New Issue