Skip to content

Commit 28b0983

Browse files
Handling unlocking in update method
1 parent fbb1388 commit 28b0983

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/sound/BaseSoundManager.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ var BaseSoundManager = new Class({
309309
* @param {number} delta - The delta time elapsed since the last frame.
310310
*/
311311
update: function (time, delta) {
312+
if (this.unlocked) {
313+
this.unlocked = false;
314+
this.emit('unlocked', this);
315+
}
312316
for (var i = this.sounds.length - 1; i >= 0; i--) {
313317
if (this.sounds[i].pendingRemove) {
314318
this.sounds.splice(i, 1);

0 commit comments

Comments
 (0)