private void processEvents() { while (m_eventQueue.Count > 0) { Events.Event e = m_eventQueue.Dequeue(); Events.EventReciever reciever = e.reciever; if (reciever != null) { reciever.onEvent(e); } else { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Error!!! Event reciever was invalid, event skipped"); } } }
public void AddEvent(Events.Event e) { m_eventQueue.Enqueue(e); }