Beispiel #1
0
        private static void loadSifStks(Game.SifResource sif)
        {
            foreach (string stkFile in sif.SoundTracks)
            {
                Sound.SoundTrackResource stk = _sceneContentManager.Load <Sound.SoundTrackResource>(stkFile);
                stk.Start(Game.GameManager.TickCount);

                _stks.Add(stk);
            }
        }
Beispiel #2
0
        public static void PlaySoundTrack(string name)
        {
            try
            {
                Sound.SoundTrackResource stk = _sceneContentManager.Load <Sound.SoundTrackResource>(name);
                stk.Start(GameManager.TickCount);

                _playingSoundTracks.AddFirst(stk);
            }
            catch (System.IO.FileNotFoundException)
            {
                // apparently this can happen sometimes, but let's at least warn
                Logger.WriteError("Unable to play {0} because it couldn't be found.", name);
            }
        }