public int Enqueue <T>( EventType eventType, Event.Lifespan lifespan, double delay, int senderId, int receiverId, EventDelegate <T> eventDelegate, T eventData, object eventKey) { var eventToSchedule = Event <T> .Obtain( ++_nextEventId, eventType, lifespan, Time.time + delay, // dispatch time senderId, receiverId, eventDelegate, eventData); lock (_eventGatherQueue) { _eventGatherQueue.Enqueue(eventToSchedule, eventToSchedule.DispatchTime); } return(eventToSchedule.EventId); }
public void RemoveAll(Event.Lifespan lifespan) { lock (_eventGatherQueue) { _eventGatherQueue.Remove(i => i.EventLifespan == lifespan); } }
public int Enqueue <T>( EventType eventType, Event.Lifespan lifespan, T eventData) { return(Enqueue(eventType, lifespan, NO_DELAY, SENDER_ID_IRRELEVANT, RECEIVER_ID_IRRELEVANT, null, eventData, null)); }
public int Enqueue <T>( EventType eventType, Event.Lifespan lifespan, int senderId, int receiverId, T eventData) { return(Enqueue(eventType, lifespan, NO_DELAY, senderId, receiverId, null, eventData, null)); }
public int Enqueue <T>( EventType eventType, Event.Lifespan lifespan, double delay, int receiverId, T eventData) { return(Enqueue(eventType, lifespan, delay, SENDER_ID_IRRELEVANT, receiverId, null, eventData, null)); }
public int Enqueue <T>( EventType eventType, Event.Lifespan lifespan, double delay, EventDelegate <T> eventDelegate, T eventData) { return(Enqueue(eventType, lifespan, delay, SENDER_ID_IRRELEVANT, RECEIVER_ID_IRRELEVANT, eventDelegate, eventData, null)); }
public int Enqueue <T>( EventType eventType, Event.Lifespan lifespan, int senderId, int receiverId, EventDelegate <T> eventDelegate, T eventData, object eventKey) { return(Enqueue(eventType, lifespan, NO_DELAY, senderId, receiverId, eventDelegate, eventData, eventKey)); }