mirror of
https://github.com/photonstorm/phaser
synced 2025-01-05 09:48:49 +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.
|
* @param {number} delta - The delta time elapsed since the last frame.
|
||||||
*/
|
*/
|
||||||
update: function (time, delta) {
|
update: function (time, delta) {
|
||||||
|
if (this.unlocked) {
|
||||||
|
this.unlocked = false;
|
||||||
|
this.emit('unlocked', this);
|
||||||
|
}
|
||||||
for (var i = this.sounds.length - 1; i >= 0; i--) {
|
for (var i = this.sounds.length - 1; i >= 0; i--) {
|
||||||
if (this.sounds[i].pendingRemove) {
|
if (this.sounds[i].pendingRemove) {
|
||||||
this.sounds.splice(i, 1);
|
this.sounds.splice(i, 1);
|
||||||
|
|
Loading…
Reference in a new issue