Пример #1
0
 private static void AIThread(IComponentAI ai)
 {
     try
     {
         ai.ResolveAI();
     } 
     catch (Exception exception)
     {
         Player player = GameMaster.Inst().GetActivePlayer();
         player.SetActive(false);
         String log = exception.Message + " : from : " + exception.Source + System.Environment.NewLine +
                      exception.HelpLink + System.Environment.NewLine +
                      exception.StackTrace + System.Environment.NewLine +
                      exception.TargetSite + System.Environment.NewLine +
                      exception.InnerException;
         Logger.Inst().Log(ai.GetAIName() + " - " + player.GetName() + ".txt", log);
     }
 }