Skip to content

Commit 2df61ab

Browse files
authored
Merge pull request phaserjs#3543 from rexrainbow/master
Add 'destroy' event of sound object
2 parents c936335 + 978c179 commit 2df61ab

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* Utils.Array.SetAll will set a property on all elements of an array to the given value, with optional range limits.
4646
* Utils.Array.Swap will swap the position of two elements in an array.
4747
* TransformMatrix.destroy is a new method that will clear out the array and object used by a Matrix internally.
48+
* Add 'destroy' event in sound object.
4849

4950
### Bug Fixes
5051

src/sound/BaseSound.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ var BaseSound = new Class({
522522
return;
523523
}
524524

525+
this.emit('destroy', this);
525526
this.pendingRemove = true;
526527
this.manager = null;
527528
this.key = '';

0 commit comments

Comments
 (0)