コード例 #1
0
        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);
        }
コード例 #2
0
 public void RemoveAll(Event.Lifespan lifespan)
 {
     lock (_eventGatherQueue)
     {
         _eventGatherQueue.Remove(i => i.EventLifespan == lifespan);
     }
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 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));
 }
コード例 #5
0
 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));
 }
コード例 #6
0
 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));
 }
コード例 #7
0
 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));
 }