Example #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;
     }
 }
Example #2
0
        public bool Send(int key, MsgInfo param)
        {
            EventInfo wrap;

            if (EventIDToAction.TryGetValue(key, out wrap))
            {
                return(wrap.Fire(key, param));
            }
            return(false);
        }
Example #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);
        }
Example #4
0
 /// <summary>
 /// 发送事件信息
 /// </summary>
 /// <param name="msgID"></param>
 public void SendMsg(int msgID, MsgInfo msgInfo)
 {
     UIManager.Instance.SendMsg(msgID, msgInfo);
 }
Example #5
0
 public static bool SendEvent(int key, MsgInfo param)
 {
     return(Instance.Send(key, param));
 }
Example #6
0
 public void SendMsg(int msgID, MsgInfo msgInfo)
 {
     mMsgManager.Send(ManagerId + msgID, msgInfo);
 }