Update: CC - Before Render - Moorcow (72d6a2a3kc.js) 173 bytes modified
parent
f3ae71c169
commit
7d85ed6cb0
|
@ -327,9 +327,22 @@ this.enemies = this.enemies.reduce(
|
||||||
|
|
||||||
if (enemy.lifeTime > enemy.life) {
|
if (enemy.lifeTime > enemy.life) {
|
||||||
/**
|
/**
|
||||||
* Do only a mesh remove, otherwise we also remove the material
|
* We only remove the things we cloned
|
||||||
*/
|
*/
|
||||||
enemy.mesh.remove();
|
GameLib.Event.Emit(
|
||||||
|
GameLib.Event.REMOVE_COMPONENT,
|
||||||
|
{
|
||||||
|
component : enemy.mesh.materials[0]
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
GameLib.Event.Emit(
|
||||||
|
GameLib.Event.REMOVE_COMPONENT,
|
||||||
|
{
|
||||||
|
component : enemy.mesh
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
result.push(enemy);
|
result.push(enemy);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue