mirror of
https://github.com/photonstorm/phaser
synced 2024-12-17 16:43:30 +00:00
Pushing all tags in an array before loading them
This commit is contained in:
parent
38e59f6f4b
commit
644a28cb3c
1 changed files with 4 additions and 4 deletions
|
@ -93,15 +93,15 @@ var HTML5AudioSoundManager = new Class({
|
|||
if (this.touchLocked) {
|
||||
var unlock_1 = function () {
|
||||
document.body.removeEventListener('touchend', unlock_1);
|
||||
var allTags = [];
|
||||
_this.game.cache.audio.entries.each(function (key, tags) {
|
||||
for (var i = 0; i < tags.length; i++) {
|
||||
tags[i].load();
|
||||
allTags.push(tags[i]);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
_this.forEachActiveSound(function (sound) {
|
||||
sound.pause();
|
||||
sound.resume();
|
||||
allTags.forEach(function (tag) {
|
||||
tag.load();
|
||||
});
|
||||
};
|
||||
document.body.addEventListener('touchend', unlock_1, false);
|
||||
|
|
Loading…
Reference in a new issue