Update: CC - Before Render - Moorcow (72d6a2a3kc.js) 173 bytes modified

beta.r3js.org
-=yb4f310 2017-11-14 16:53:02 +01:00
parent f3ae71c169
commit 7d85ed6cb0
1 changed files with 15 additions and 2 deletions

View File

@ -327,9 +327,22 @@ this.enemies = this.enemies.reduce(
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 {
result.push(enemy);
}