Exemplo n.º 1
0
 public void SendMsg(MsgBase msg)
 {
     if (msg.GetManager() == ManagerID.UIManager)
     {
         //属于本模块的
         this.ProcessEvent(msg);
     }
     else
     {
         MsgCenter.Instance.SendToMsg(msg);
     }
 }
Exemplo n.º 2
0
 //来了消息通知整个消息链表
 public override void ProcessEvent(MsgBase tmpMsg)
 {
     if (!eventTree.ContainsKey(tmpMsg.msgId))
     {
         Debug.LogError("msg不等于msgid:" + tmpMsg.msgId);
         Debug.LogError("msg Manager==:" + tmpMsg.GetManager());
         return;
     }
     else
     {
         EventNode tmp = eventTree[tmpMsg.msgId];
         do
         {
             tmp.data.ProcessEvent(tmpMsg);
             tmp = tmp.next;
         }while(tmp != null);
     }
 }