delete clone should not stop sound (#1269)

This commit is contained in:
Mx Corey Frang 2018-06-25 15:44:39 -04:00 committed by Eric Rosenbaum
parent 0dffc65ce9
commit 236f914f55

View file

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