1 decade ago by TigerJ
update:function(){ if(!this.letsStartLooping) { switch (ig.music.currentTrack) { case ig.music.tracks[0]: break; case ig.music.tracks[1]: ig.music.loop=true; this.letsStartLooping=true; break; } } this.parent(); },
I must be tired or I must be missing something.
Full main.js is here along with the game source.
https://github.com/TigerJ/DC2183/blob/master/lib/game/main.js
I swear this works in another game I have running locally. I'm not sure why it's not working here unless impact++ is doing something..
Pretty much this should see when the current track is not the first track in the tracks array and then begin to loop. So an "intro" gets played before the loop.