mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 22:42:27 -05:00
Stop all sounds by clones when disposed
This commit is contained in:
parent
c087cf326a
commit
14f8c44ad9
1 changed files with 3 additions and 0 deletions
|
@ -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 ?
|
||||
|
|
Loading…
Reference in a new issue