Esempio n. 1
0
 public void RemoveHandle(Type type, TocHandler handler)
 {
     if (mHandlerDict.ContainsKey(type))
     {
         mHandlerDict[type] -= handler;
     }
 }
Esempio n. 2
0
 public void AddHandler(Type type, TocHandler handler)
 {
     if (_handlerDic.ContainsKey(type))
     {
         _handlerDic[type] += handler;
     }
     else
     {
         _handlerDic.Add(type, handler);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 增加消息回调
 /// </summary>
 /// <param name="type"></param>
 /// <param name="handler"></param>
 public void AddHandler(Type type, TocHandler handler)
 {
     if (mHandlerDict.ContainsKey(type))
     {
         mHandlerDict[type] += handler;
     }
     else
     {
         mHandlerDict.Add(type, handler);
     }
 }
 protected void AddTocHandler(Type type, TocHandler handler)
 {
     NetManager.Instance.AddHandler(type, handler);
 }