Stop all sounds by clones when disposed

This commit is contained in:
Corey Frang 2018-06-15 12:54:44 -04:00
parent c087cf326a
commit 14f8c44ad9

View file

@ -1130,6 +1130,9 @@ class RenderedTarget extends Target {
dispose () {
this.runtime.changeCloneCounter(-1);
this.runtime.stopForTarget(this);
if (this.sprite.soundBank) {
this.sprite.soundBank.stopAllSounds(this);
}
this.sprite.removeClone(this);
if (this.renderer && this.drawableID !== null) {
this.renderer.destroyDrawable(this.drawableID, this.isStage ?