Update: CC - Before Render - Moorcow (zo950m57cc.js) 185 bytes modified
parent
14ff6e3f79
commit
85657e9c8f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue