/// <summary> /// 处理消息. /// 原理是讲本消息放入列表, 然后在后面的update中进行处理 /// </summary> /// <param name="message"></param> public void HandleMessage(CAIMessage message) { if (m_messagesToProcessCache == null) { m_messagesToProcessCache = new List <CAIMessage>(); m_messagesToProcess = new List <CAIMessage>(); } m_messagesToProcessCache.Add(message); }
public void OnMessage(CAIMessage Message) { if (!string.Equals(MessageType, Message.Name)) { return; } if (m_filterId && m_messageId != Message.Id) { return; } m_delegate(Message); }
/// <summary> /// 派发消息给target /// </summary> public static void Send(CAIController target, CAIMessage message) { target.BrainComp.HandleMessage(message); }