Skip to content

Commit 5c3ad36

Browse files
Added isLocked method docs
1 parent fbafeee commit 5c3ad36

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/sound/html5/HTML5AudioSoundManager.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,18 @@ var HTML5AudioSoundManager = new Class({
194194
this.onBlurPausedSounds.length = 0;
195195
this.onBlurPausedSounds = null;
196196
},
197+
/**
198+
* Method used internally by Phaser.Sound.HTML5AudioSound class methods and property setters
199+
* to check if sound manager is locked and then either perform action immediately or queue it
200+
* to be performed once the sound manager gets unlocked.
201+
*
202+
* @private
203+
* @method Phaser.Sound.HTML5AudioSoundManager#isLocked
204+
* @param {Phaser.Sound.HTML5AudioSound} sound - Sound object on which to perform queued action.
205+
* @param {string} prop - Name of the method to be called or property to be assigned a value to.
206+
* @param {*} [value] - An optional parameter that either holds an array of arguments to be passed to the method call or value to be set to the property.
207+
* @returns {boolean} Whether the sound manager is locked.
208+
*/
197209
isLocked: function (sound, prop, value) {
198210
if (this.locked) {
199211
this.lockedActionsQueue.push({

0 commit comments

Comments
 (0)