public static void HandleEvent(Event leEvent) { dynamic go = Map.GetGameObject(leEvent.Id); if (go != null) { dynamic specificEvent = Convert.ChangeType(leEvent, leEvent.GetType()); Console.WriteLine(leEvent); go.ReceiveEvent(specificEvent); } }
public static void SendEvent(Event leEvent) { MemoryStream ms = new MemoryStream(); try { outgoingEvents.Enqueue(leEvent); } catch (Exception e) { Console.WriteLine(e); Console.WriteLine("something died :( Client=>SendEvent(Event)"); } }