Example #1
0
 public void bindMsgExHandler(Int16 cmd, MsgExHandler handler)
 {
     if (m_net != null)
     {
         m_net.bindMsgExHandler((Int16)(cmd), handler);
     }
 }
Example #2
0
        public bool bindMsgExHandler(Int16 cmd, MsgExHandler handler)
        {
            MsgExHandler handlerEvent;

            if (msgExHandlers.TryGetValue(cmd, out handlerEvent))
            {
#if UNITY_EDITOR
                LogMgr.LogError("网络扩展消息处理重复注册:{0}", cmd);
#endif
                return(false);
            }
            else
            {
                msgExHandlers.Add(cmd, handler);

                return(true);
            }
        }