public void DispatchMessage (double delay, int sender, int receiver, MessageType msg, System.Object extraInfo) { Message message = new Message (); message.sender = sender; message.receiver = receiver; message.msg = msg; message.dispatchTime = delay; message.extraInfo = extraInfo; DispatchMessage (delay, message); }
public void DispatchMessage (double delay, Message message) { if (BaseWorld.entityManager == null) return; BaseGameEntity receiverEntity = BaseWorld.entityManager.getEntityFromId (message.receiver); if (delay <= 0) { Discharge (receiverEntity, message); } else { message.dispatchTime = UnityEngine.Time.time + delay; priorityQ.Enqueue (message); } }
public void removeMessage (Message message) { }
public void Discharge (BaseGameEntity receiver, Message message) { receiver.handleMessage (message); }