Пример #1
0
 public void UnRegisterHandler(int id, TTUIMsgHandler handler)
 {
     if ((handler != null) && this.handlerDic.ContainsKey(id))
     {
         this.handlerDic[id] = Delegate.Remove(this.handlerDic[id], handler);
         if (this.handlerDic[id] == null)
         {
             this.handlerDic.Remove(id);
         }
     }
 }
Пример #2
0
 public void RegisterHandler(int id, TTUIMsgHandler handler)
 {
     if (handler == null)
     {
         Debug.LogWarning("handler is null");
     }
     else
     {
         if (!this.handlerDic.ContainsKey(id))
         {
             this.handlerDic.Add(id, null);
         }
         this.handlerDic[id] = Delegate.Combine(this.handlerDic[id], handler);
     }
 }
Пример #3
0
 public void RegisterHandler(int id, TTUIMsgHandler handler)
 {
     if (handler == null)
     {
         Debug.LogWarning("handler is null");
     }
     else
     {
         if (!this.handlerDic.ContainsKey(id))
         {
             this.handlerDic.Add(id, null);
         }
         this.handlerDic[id] = Delegate.Combine( this.handlerDic[id], handler);
     }
 }
Пример #4
0
 public void UnRegisterHandler(int id, TTUIMsgHandler handler)
 {
     if ((handler != null) && this.handlerDic.ContainsKey(id))
     {
         this.handlerDic[id] = Delegate.Remove( this.handlerDic[id], handler);
         if (this.handlerDic[id] == null)
         {
             this.handlerDic.Remove(id);
         }
     }
 }