public new void Fire()
 {
     lock (eventsLock)
     {
         if (events.Count == 0)
         {
             Monitor.Wait(eventsLock);
         }
         execEvents = events;
         events     = new Queue <NetEvent>();
     }
     while (execEvents.Count != 0)
     {
         NetEvent netEvent = execEvents.Dequeue();
         if (netEvent != null)
         {
             netEvent.Fire();
         }
     }
 }
Beispiel #2
0
 protected void Fire()
 {
     lock (eventsLock)
     {
         if (events.Count == 0)
         {
             return;
         }
         execEvents = events;
         events     = new Queue <NetEvent>();
     }
     while (execEvents.Count != 0)
     {
         NetEvent netEvent = execEvents.Dequeue();
         if (netEvent != null)
         {
             netEvent.Fire();
         }
     }
 }
Beispiel #3
0
 public void Trigger(NetEvent netEvent)
 {
     events.Put(netEvent);
 }