Skip to content

Commit d8eb945

Browse files
Added playAudioSprite method docs
1 parent a548e4d commit d8eb945

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

v3/src/sound/BaseSoundManager.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,15 @@ var BaseSoundManager = new Class({
162162
sound.play();
163163
}
164164
},
165+
/**
166+
* Enables playing audio sprite sound on the fly without the need to keep a reference to it.
167+
* Sound will auto destroy once its playback ends.
168+
*
169+
* @method Phaser.Sound.BaseSoundManager#playAudioSprite
170+
* @param {string} key - Asset key for the sound.
171+
* @param {string} spriteName - The name of the sound sprite to play.
172+
* @param {ISoundConfig} [config] - An optional config object containing default sound settings.
173+
*/
165174
playAudioSprite: function (key, spriteName, config) {
166175
var sound = this.addAudioSprite(key);
167176
sound.events.once('SOUND_ENDED', sound.destroy.bind(sound));

0 commit comments

Comments
 (0)