Exemplo n.º 1
0
        private void OnDestory()
        {
            OnBeforeDestory();

            foreach (var msg in m_MsgRecord)
            {
                MsgDisPatcher.UnRegistMsg(msg.Name, msg.OnMsgReceived);
                msg.Recycle();
            }
            m_MsgRecord.Clear();
        }
Exemplo n.º 2
0
 public void RegisterMsg(string msgName, Action <object> onMsgReceives)
 {
     MsgDisPatcher.Regist(msgName, onMsgReceives);
     m_MsgRecord.Add(MsgRecord.Allocate(msgName, onMsgReceives));
 }