Update: CC - Before Render - Moorcow (zo950m57cc.js) 185 bytes modified

beta.r3js.org
-=yb4f310 2017-11-26 23:37:01 +01:00
parent 14ff6e3f79
commit 85657e9c8f
1 changed files with 15 additions and 10 deletions

View File

@ -228,7 +228,7 @@
mesh = this.meshes[meshType][i].mesh;
mesh.burnLife = 1;
mesh.explodeLife = 1;
mesh.instance.material.color.set(1,1,1);
mesh.instance.material.color.setRGB(1,1,1);
return mesh;
}
@ -567,15 +567,20 @@
this.kill = function(enemy) {
this.meshes[enemy.meshType] = this.meshes[enemy.meshType].map(
function(object) {
if (object.mesh === enemy.mesh) {
object.inUse = false;
object.mesh.visible = false;
object.mesh.updateInstance('visible');
}
var found = false;
for (var i = 0; i < this.meshes[enemy.meshType].length; i++) {
if (this.meshes[enemy.meshType].mesh === enemy.mesh) {
found = true;
this.meshes[enemy.meshType].inUse = false;
this.meshes[enemy.meshType].mesh.visible = false;
this.meshes[enemy.meshType].mesh.updateInstance('visible');
}
)
}
if (!found) {
console.warn('could not find mesh to kill');
}
/**
* We only remove the things we cloned
@ -787,7 +792,7 @@
}
}
mesh.instance.material.color.set(
mesh.instance.material.color.setRGB(
1 - mesh.explodeLife,
mesh.burnLife,
mesh.burnLife