mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Implemented remove method
This commit is contained in:
parent
5790fe9a4f
commit
5f56d038f5
1 changed files with 8 additions and 1 deletions
|
@ -134,7 +134,14 @@ var BaseSoundManager = new Class({
|
|||
sound.events.once('SOUND_ENDED', sound.destroy.bind(sound));
|
||||
sound.play(spriteName, config);
|
||||
},
|
||||
remove: NOOP,
|
||||
remove: function (sound) {
|
||||
var index = this.sounds.indexOf(sound);
|
||||
if (index !== -1) {
|
||||
this.sounds.splice(index, 1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
removeByKey: NOOP,
|
||||
pauseAll: function () {
|
||||
this.sounds.forEach(function (sound) {
|
||||
|
|
Loading…
Add table
Reference in a new issue