예제 #1
0
 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);
     }
 }
예제 #2
0
파일: Client.cs 프로젝트: ZacJ/BroodLord
 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)");
     }
 }