Update: CC - Before Render - Moorcow (plccpu9dx0.js) 147 bytes modified
parent
28e997fbf9
commit
c01ad67818
|
@ -269,9 +269,9 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
|||
}
|
||||
|
||||
this.kill = function(enemy) {
|
||||
/**
|
||||
* We only remove the things we cloned
|
||||
*/
|
||||
/**
|
||||
* We only remove the things we cloned
|
||||
*/
|
||||
GameLib.Event.Emit(
|
||||
GameLib.Event.REMOVE_COMPONENT,
|
||||
{
|
||||
|
@ -286,6 +286,12 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
|||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Also dispose of the THREE.js objects
|
||||
*/
|
||||
enemy.mesh.instance.geometry.dispose();
|
||||
enemy.mesh.instance.material.dispose();
|
||||
|
||||
if (enemy.smokeParticleEngine) {
|
||||
enemy.smokeParticleEngine.remove();
|
||||
enemy.smokeParticleEngine = null;
|
||||
|
|
Loading…
Reference in New Issue