public void StopSoundEffect(SoundBase sound) { if (sound == null) { return; } sound.Stop(); sound.Destroy(); CommonObjectPools.Despawn(sound); }
public void ClearBGSound() { for (int i = 0; i < m_ListBGAudio.Count; ++i) { SoundBase sound = m_ListBGAudio[i]; sound.Stop(); sound.Destroy(); CommonObjectPools.Despawn(sound); } m_ListBGAudio.Clear(); }