コード例 #1
0
 /// <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);
     }
 }
コード例 #2
0
 /// <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);
     }
 }
コード例 #3
0
 /// <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();
     }
 }