diff --git a/common/combat/emitter.js b/common/combat/emitter.js index 04feb08..6e0b96f 100644 --- a/common/combat/emitter.js +++ b/common/combat/emitter.js @@ -55,6 +55,10 @@ export class DamageEmitter { this.proton.addRender(this.renderer); } + destroy() { + this.proton.destroy(); + } + emit(position, damage) { // BUGS const pz = new Proton.PointZone(); @@ -84,7 +88,11 @@ export class DamageEmitter { } hasParticles() { - return this.emitter.particles.length > 0; + return this.particleCount > 0; + } + + get particleCount() { + return this.emitter.particles.length; } tick(elapsed) {