Esempio n. 1
0
        /// <summary>
        /// UnloadContent will be called once per game and is the place to unload
        /// all content.
        /// </summary>
        protected override void UnloadContent()
        {
            Textures.Clear();
            Fonts.Clear();
            SoundEffects.Clear();
            Songs.Clear();

            ContentManager.Unload();
#if DEBUG
            SpartaDebug.DebugFont = null;
#endif
            backgroundImage = null;

            base.UnloadContent();

            GC.Collect();
        }
Esempio n. 2
0
 public void StopAllFX()
 {
     SoundEffects.ForEach(f => f.Stop(true));
     SoundEffects.Clear();
 }