private void ChangeColor(int key, MsgInfo param) { if (param != null && param.DataList.Count > 0) { Color color = (Color)param.DataList[0]; bg.color = color; } }
public bool Send(int key, MsgInfo param) { EventInfo wrap; if (EventIDToAction.TryGetValue(key, out wrap)) { return(wrap.Fire(key, param)); } return(false); }
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); }
/// <summary> /// 发送事件信息 /// </summary> /// <param name="msgID"></param> public void SendMsg(int msgID, MsgInfo msgInfo) { UIManager.Instance.SendMsg(msgID, msgInfo); }
public static bool SendEvent(int key, MsgInfo param) { return(Instance.Send(key, param)); }
public void SendMsg(int msgID, MsgInfo msgInfo) { mMsgManager.Send(ManagerId + msgID, msgInfo); }