mirror of
https://github.com/photonstorm/phaser
synced 2025-01-05 17:58:48 +00:00
Gathering all actions and performing them sequentially
This commit is contained in:
parent
dc3938e8ff
commit
d8e36615e7
1 changed files with 16 additions and 0 deletions
|
@ -130,6 +130,22 @@ var HTML5AudioSoundManager = new Class({
|
||||||
if (this.touchUnlocked) {
|
if (this.touchUnlocked) {
|
||||||
this.touchUnlocked = false;
|
this.touchUnlocked = false;
|
||||||
this.touchLocked = false;
|
this.touchLocked = false;
|
||||||
|
var allSoundsTouchLockedActionQueue_1 = [];
|
||||||
|
this.forEachActiveSound(function (sound) {
|
||||||
|
sound.touchLockedActionQueue.forEach(function (touchLockedAction) {
|
||||||
|
allSoundsTouchLockedActionQueue_1.push(touchLockedAction);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
allSoundsTouchLockedActionQueue_1.forEach(function (touchLockedAction) {
|
||||||
|
switch (touchLockedAction.type) {
|
||||||
|
case 'method':
|
||||||
|
touchLockedAction.sound[touchLockedAction.name].apply(touchLockedAction.sound, touchLockedAction.value || []);
|
||||||
|
break;
|
||||||
|
case 'property':
|
||||||
|
touchLockedAction.sound[touchLockedAction.name] = touchLockedAction.value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
BaseSoundManager.prototype.update.call(this);
|
BaseSoundManager.prototype.update.call(this);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue