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