示例#1
0
        public override void LoadContent()
        {
            base.LoadContent();

            _BackgroundMusic = SoundManager.AddSound(new CutlassSong("Content/Sounds/Music/TellerOfTheTales"));
            SoundManager.GetSound(_BackgroundMusic).PlayFadeIn(5000);
        }
示例#2
0
        /// <summary>
        /// Remove a sound.
        /// </summary>
        /// <param name="soundId"></param>
        public static void RemoveSound(SoundId soundId)
        {
            ICutlassSound soundToRemove;
            _Sounds.TryGetValue(soundId, out soundToRemove);

            if (soundToRemove != null)
            {
                if (_Initialized)
                    soundToRemove.UnloadContent();

                _Sounds.Remove(soundId);
            }
        }
示例#3
0
 /// <summary>
 /// Get a sound
 /// </summary>
 /// <param name="soundId"></param>
 /// <returns></returns>
 public static ICutlassSound GetSound(SoundId soundId)
 {
     return _Sounds.ElementAtOrDefault(soundId).Value;
 }