Exemplo n.º 1
0
 private void FireEvent(BaseGameEvent theEvent)
 {
     foreach (EventReaction eventReaction in subscriberDirectory[theEvent.EventType])
     {
         eventReaction(theEvent);
     }
 }
Exemplo n.º 2
0
 public void SendEvent(BaseGameEvent theEvent)
 {
     if (subscriberDirectory.ContainsKey(theEvent.EventType))
     {
         if (theEvent.Delay == 0)
         {
             FireEvent(theEvent);
         }
         else
         {
             eventQueue.Add(currentTime + theEvent.Delay, theEvent);
         }
     }
 }