fix miss hit getting emitted when restarting / clearing

This commit is contained in:
Kevin Ngo
2018-10-13 09:53:16 -07:00
parent 388a80cd28
commit 8f52240e58

View File

@@ -405,7 +405,6 @@ AFRAME.registerComponent('beat', {
returnToPool: function (force) {
if (!this.backToPool && !force) { return; }
if (!this.destroyed) { this.missHit(); }
this.el.sceneEl.components[this.poolName].returnEntity(this.el);
},
@@ -474,6 +473,7 @@ AFRAME.registerComponent('beat', {
this.backToPool = this.returnToPoolTimer <= 0;
}
if (!this.destroyed) { this.missHit(); }
this.returnToPool();
};
})(),