public static void RemoveEventCallback(uint in_playingID) { var cookiesToRemove = new System.Collections.Generic.List <int>(); foreach (var pair in m_mapEventCallbacks) { if (pair.Value.m_playingID == in_playingID) { cookiesToRemove.Add(pair.Key); break; } } var Count = cookiesToRemove.Count; for (var ii = 0; ii < Count; ++ii) { m_mapEventCallbacks.Remove(cookiesToRemove[ii]); } AkSoundEnginePINVOKE.CSharp_CancelEventCallback(in_playingID); }
static public void RemoveEventCallback(uint in_playingID) { List <int> cookiesToRemove = new List <int>(); foreach (KeyValuePair <int, EventCallbackPackage> pair in m_mapEventCallbacks) { if (pair.Value.m_playingID == in_playingID) { cookiesToRemove.Add(pair.Key); break; } } int Count = cookiesToRemove.Count; for (int ii = 0; ii < Count; ++ii) { m_mapEventCallbacks.Remove(cookiesToRemove[ii]); } AkSoundEnginePINVOKE.CSharp_CancelEventCallback(in_playingID); }
public static void RemoveEventCallbackByPlayer(uint in_playingID) { var cookiesToRemove = new System.Collections.Generic.List <int>(); foreach (var pair in m_mapEventCallbacks) { if (pair.Value.m_playingID == in_playingID) { cookiesToRemove.Add(pair.Key); break; } } foreach (var key in cookiesToRemove) { var package = m_mapEventCallbacks[key]; m_mapEventCallbacks.Remove(key); package.Reset(); resumeEventCallbackPackages.Push(package); } AkSoundEnginePINVOKE.CSharp_CancelEventCallback(in_playingID); }