Skip to content

Commit

Permalink
preload high priority area and event audio
Browse files Browse the repository at this point in the history
  • Loading branch information
orsi committed Jun 3, 2020
1 parent 3a2819d commit fd4fbe6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions script/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@
Engine.loadGame();
}

// start loading music and events early
for (var key in AudioLibrary) {
if (
key.toString().indexOf('MUSIC_') > -1 ||
key.toString().indexOf('EVENT_') > -1) {
AudioEngine.loadAudioFile(AudioLibrary[key]);
}
}

$('<div>').attr('id', 'locationSlider').appendTo('#main');

var menu = $('<div>')
Expand Down

0 comments on commit fd4fbe6

Please sign in to comment.