Emitter::[destroy|particleCount]

This commit is contained in:
cha0s 2019-04-25 03:43:31 -05:00
parent e3f6c2118d
commit f7dae4f370

View File

@ -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) {