public SoundBGContent AddBGSound(string name) { SoundBGContent sound = new SoundBGContent(name); if (!_bgSounds.Contains(sound)) { _bgSounds.Add(sound); return(sound); } _bgSounds.Add(sound); int index = _bgSounds.IndexOf(sound); return(_bgSounds[index]); }
void LoadBGSounds(ContentManager content) { for (int i = currentSoundBGCount; i < _bgSounds.Count; i++) { if (_bgSounds[i] != null) { SoundBGContent sound = _bgSounds[i]; try { sound.Sound = content.Load <Song>(sound.Name); } catch (Exception e) { Debug.WriteLine("Song could not be loaded: " + e.Message); } } currentSoundBGCount++; } }
public void AddBGSongContent(SoundBGContent bgSoundPack) { _bgSounds.Add(bgSoundPack); }