Emitter::[destroy|particleCount]
This commit is contained in:
parent
e3f6c2118d
commit
f7dae4f370
|
@ -55,6 +55,10 @@ export class DamageEmitter {
|
||||||
this.proton.addRender(this.renderer);
|
this.proton.addRender(this.renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
this.proton.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
emit(position, damage) {
|
emit(position, damage) {
|
||||||
// BUGS
|
// BUGS
|
||||||
const pz = new Proton.PointZone();
|
const pz = new Proton.PointZone();
|
||||||
|
@ -84,7 +88,11 @@ export class DamageEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
hasParticles() {
|
hasParticles() {
|
||||||
return this.emitter.particles.length > 0;
|
return this.particleCount > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
get particleCount() {
|
||||||
|
return this.emitter.particles.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
tick(elapsed) {
|
tick(elapsed) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user