private void InitDuckedCategoryDefs() { if (this.m_DuckAllCategories && (this.m_GlobalDuckDef != null)) { this.m_DuckedCategoryDefs = new List <SoundDuckedCategoryDef>(); IEnumerator enumerator = Enum.GetValues(typeof(SoundCategory)).GetEnumerator(); try { while (enumerator.MoveNext()) { SoundCategory current = (SoundCategory)((int)enumerator.Current); if (current != SoundCategory.NONE) { SoundDuckedCategoryDef dst = new SoundDuckedCategoryDef(); SoundUtils.CopyDuckedCategoryDef(this.m_GlobalDuckDef, dst); dst.m_Category = current; this.m_DuckedCategoryDefs.Add(dst); } } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable == null) { } disposable.Dispose(); } } }
public static void CopyDuckedCategoryDef(SoundDuckedCategoryDef src, SoundDuckedCategoryDef dst) { dst.m_Category = src.m_Category; dst.m_Volume = src.m_Volume; dst.m_BeginSec = src.m_BeginSec; dst.m_BeginEaseType = src.m_BeginEaseType; dst.m_RestoreSec = src.m_RestoreSec; dst.m_RestoreEaseType = src.m_RestoreEaseType; }