Esempio n. 1
0
 public static void LaunchGame(string[] args, bool monoArgs = false)
 {
     if (monoArgs)
     {
         args = Utils.ConvertMonoArgsToDotNet(args);
     }
     if (Platform.get_IsOSX())
     {
         Main.OnEngineLoad += (Action)(() => Main.instance.set_IsMouseVisible(false));
     }
     Program.LaunchParameters = Utils.ParseArguements(args);
     ThreadPool.SetMinThreads(8, 8);
     LanguageManager.Instance.SetLanguage(GameCulture.English);
     Program.SetupLogging();
     using (Main game = new Main())
     {
         try
         {
             Program.InitializeConsoleOutput();
             Lang.InitializeLegacyLocalization();
             SocialAPI.Initialize(new SocialMode?());
             LaunchInitializer.LoadParameters(game);
             Main.OnEnginePreload += new Action(Program.StartForceLoad);
             game.Run();
         }
         catch (Exception ex)
         {
             Program.DisplayException(ex);
         }
     }
 }
Esempio n. 2
0
 public static void LaunchGame(string[] args, bool monoArgs = false)
 {
     Thread.CurrentThread.Name = "Main Thread";
     if (monoArgs)
     {
         args = Utils.ConvertMonoArgsToDotNet(args);
     }
     if (false)
     {
         Main.OnEngineLoad += delegate
         {
             Main.instance.IsMouseVisible = false;
         };
     }
     LaunchParameters = Utils.ParseArguements(args);
     ThreadPool.SetMinThreads(8, 8);
     LanguageManager.Instance.SetLanguage(GameCulture.DefaultCulture);
     InitializeConsoleOutput();
     SetupLogging();
     //Platform.Get<IWindowService>().SetQuickEditEnabled(false);
     using Main main = new Main();
     try
     {
         Lang.InitializeLegacyLocalization();
         //SocialAPI.Initialize();
         LaunchInitializer.LoadParameters(main);
         Main.OnEnginePreload += StartForceLoad;
         main.Run();
     }
     catch (Exception e)
     {
         DisplayException(e);
     }
 }
Esempio n. 3
0
 public static void LaunchGame(string[] args, bool monoArgs = false)
 {
     if (monoArgs)
     {
         args = Utils.ConvertMonoArgsToDotNet(args);
     }
     if (Platform.get_IsOSX())
     {
         // ISSUE: reference to a compiler-generated field
         if (Program.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate5 == null)
         {
             // ISSUE: reference to a compiler-generated field
             // ISSUE: method pointer
             Program.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate5 = new Action((object)null, __methodptr(\u003CLaunchGame\u003Eb__4));
         }
         // ISSUE: reference to a compiler-generated field
         Main.OnEngineLoad += Program.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate5;
     }
     Program.LaunchParameters = Utils.ParseArguements(args);
     ThreadPool.SetMinThreads(8, 8);
     LanguageManager.Instance.SetLanguage(GameCulture.English);
     Program.SetupLogging();
     using (Main game = new Main())
     {
         try
         {
             Program.InitializeConsoleOutput();
             Lang.InitializeLegacyLocalization();
             SocialAPI.Initialize(new SocialMode?());
             LaunchInitializer.LoadParameters(game);
             // ISSUE: method pointer
             Main.OnEnginePreload += new Action((object)null, __methodptr(StartForceLoad));
             game.DedServ();
         }
         catch (Exception ex)
         {
             Program.DisplayException(ex);
         }
     }
 }