예제 #1
0
        /// <summary>
        /// 注册消息
        /// </summary>
        /// <param name="mono"></param>
        /// <param name="msgIds"></param>
        public void RegistMsgs(IMessageProcess mono, List <ushort> msgIds)
        {
            for (int i = 0; i < msgIds.Count; i++)
            {
                switch (MsgBase.GetMsgType(msgIds[i]))
                {
                case MsgType.UI:
                    uiMgr.RegistMsg(mono, msgIds[i]);
                    break;

                case MsgType.Net:
                    netMgr.RegistMsg(mono, msgIds[i]);
                    break;

                case MsgType.Entity:
                    entityMgr.RegistMsg(mono, msgIds[i]);
                    break;

                case MsgType.Audio:
                    audioMgr.RegistMsg(mono, msgIds[i]);
                    break;

                case MsgType.Asset:
                    assetMgr.RegistMsg(mono, msgIds[i]);
                    break;
                }
            }
        }