diff --git a/72d6a2a3kc.js b/72d6a2a3kc.js index 0b60431..4e29743 100644 --- a/72d6a2a3kc.js +++ b/72d6a2a3kc.js @@ -164,13 +164,24 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { enemy.life = 15; enemy.exploding = false; - + enemy.explodingLife = 2; + this.enemies.push(enemy); } this.explode = function(mesh) { - var particleEngine = this.smokeParticleEngine.clone(); - particleEngine.position = mesh.position.clone(); + + this.enemies.map( + function(enemy) { + if (enemy.mesh === mesh) { + enemy.exploding = true; + var particleEngine = this.smokeParticleEngine.clone(); + particleEngine.position = mesh.position.clone(); + } + } + ); + + } }