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 int Enqueue <T>( EventType eventType, Event.Lifespan lifespan, int receiverId, T eventData) { return(Enqueue(eventType, lifespan, _NO_DELAY, _SENDER_ID_IRRELEVANT, receiverId, 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, EventDelegate <T> eventDelegate, T eventData) { return(Enqueue(eventType, lifespan, _NO_DELAY, _SENDER_ID_IRRELEVANT, RECEIVER_ID_IRRELEVANT, eventDelegate, eventData, null)); }
public int Enqueue <T>( EventType eventType, Event.Lifespan lifespan, double delay, T eventData) { return(Enqueue(eventType, lifespan, delay, _SENDER_ID_IRRELEVANT, RECEIVER_ID_IRRELEVANT, null, 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)); }
public void RemoveAll(Event.Lifespan lifespan) { lock (_eventGatherQueue){ _eventGatherQueue.Remove(i => i.EventLifespan == lifespan); } }