예제 #1
0
 private void ChangeColor(int key, MsgInfo param)
 {
     if (param != null && param.DataList.Count > 0)
     {
         Color color = (Color)param.DataList[0];
         bg.color = color;
     }
 }
예제 #2
0
        public bool Send(int key, MsgInfo param)
        {
            EventInfo wrap;

            if (EventIDToAction.TryGetValue(key, out wrap))
            {
                return(wrap.Fire(key, param));
            }
            return(false);
        }
예제 #3
0
        public bool Fire(int key, MsgInfo param)
        {
            if (mEventList == null)
            {
                return(false);
            }

            var      next = mEventList.First;
            MsgEvent call = null;
            LinkedListNode <MsgEvent> nextCache = null;

            while (next != null)
            {
                call      = next.Value;
                nextCache = next.Next;
                call(key, param);

                next = next.Next ?? nextCache;
            }

            return(true);
        }
예제 #4
0
 /// <summary>
 /// 发送事件信息
 /// </summary>
 /// <param name="msgID"></param>
 public void SendMsg(int msgID, MsgInfo msgInfo)
 {
     UIManager.Instance.SendMsg(msgID, msgInfo);
 }
예제 #5
0
 public static bool SendEvent(int key, MsgInfo param)
 {
     return(Instance.Send(key, param));
 }
예제 #6
0
 public void SendMsg(int msgID, MsgInfo msgInfo)
 {
     mMsgManager.Send(ManagerId + msgID, msgInfo);
 }