mirror of
https://github.com/photonstorm/phaser
synced 2024-12-17 16:43:30 +00:00
Handling unlocking in update method
This commit is contained in:
parent
fbb1388f2d
commit
28b098348b
1 changed files with 4 additions and 0 deletions
|
@ -309,6 +309,10 @@ var BaseSoundManager = new Class({
|
|||
* @param {number} delta - The delta time elapsed since the last frame.
|
||||
*/
|
||||
update: function (time, delta) {
|
||||
if (this.unlocked) {
|
||||
this.unlocked = false;
|
||||
this.emit('unlocked', this);
|
||||
}
|
||||
for (var i = this.sounds.length - 1; i >= 0; i--) {
|
||||
if (this.sounds[i].pendingRemove) {
|
||||
this.sounds.splice(i, 1);
|
||||
|
|
Loading…
Reference in a new issue