public void PauseAll() { m_looping = false; StopAllCoroutines(); IDictionaryEnumerator enumerator = m_childComponents.GetEnumerator(); try { while (enumerator.MoveNext()) { DictionaryEntry dictionaryEntry = (DictionaryEntry)enumerator.Current; if (dictionaryEntry.Value is AudioComponent) { AudioComponent audioComponent = dictionaryEntry.Value as AudioComponent; audioComponent.PauseAll(); } if (dictionaryEntry.Value is AudioRandomComponent) { AudioRandomComponent audioRandomComponent = dictionaryEntry.Value as AudioRandomComponent; audioRandomComponent.PauseAll(); } } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } }