/// <summary> /// Remove listeners by event type and index position /// </summary> /// <param name="type">event type</param> /// <param name="index">position</param> public void Off(string type, int index) { if (EventListenersDict.ContainsKey(type)) { EventListenersDict[type].RemoveAt(index); } }
/// <summary> /// Remove listener by type and callback instance /// </summary> /// /// <param name="type">event type</param> /// <param name="callback">callback instance</param> public void Off(string type, Action <IEnumerable <object> > callback) { if (EventListenersDict.ContainsKey(type)) { EventListenersDict[type].Remove(callback); } }
/// <summary> /// Remove listeners by event type /// </summary> /// <param name="type">event type</param> public void Off(string type) { if (EventListenersDict.ContainsKey(type)) { EventListenersDict[type].Clear(); } }