public void ReplaceBackground(SoundType sound) { MainBackground.Stop(); MainBackground.Dispose(); MainBackground = GetAndPlay(sound, true); MainBackground.Pitch = BackgroundPitch; }
public void Reset() { MainBackground.Stop(); MainBackground.Dispose(); if (SecondaryBackground != null) { SecondaryBackground.Stop(); SecondaryBackground.Dispose(); SecondaryBackground = null; } PlayingList.Clear(); PoolList.Clear(); InitializeSoundPool(); MainBackground = GetAndPlay(SoundType.Background, true); BackgroundPitch = 0; MainBackground.Pitch = BackgroundPitch; }