/// <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(); }
public void StopAllFX() { SoundEffects.ForEach(f => f.Stop(true)); SoundEffects.Clear(); }