Beispiel #1
0
        static void Main()
        {
            using (var typeContainer = TypeContainer.Get <ITypeContainer>())
            {
                Startup.Register(typeContainer);
                Startup.ConfigureLogger(ClientType.DesktopClient);

                Network.Startup.Register(typeContainer);

                var logger = (typeContainer.GetOrNull <ILogger>() ?? NullLogger.Default).As("OctoAwesome.Client");
                AppDomain.CurrentDomain.UnhandledException += (s, e) =>
                {
                    File.WriteAllText(
                        Path.Combine(".", "logs", $"client-dump-{DateTime.Now:ddMMyy_hhmmss}.txt"),
                        e.ExceptionObject.ToString());

                    logger.Fatal($"Unhandled Exception: {e.ExceptionObject}", e.ExceptionObject as Exception);
                    logger.Flush();
                };

                using (game = new OctoGame())
                    game.Run(60, 60);
            }
        }
Beispiel #2
0
 public static void Restart()
 {
     game.Exit();
     using (game = new OctoGame())
         game.Run(60, 60);
 }
Beispiel #3
0
 static void Main()
 {
     using (var game = new OctoGame())
         game.Run();
 }
Beispiel #4
0
 static void Main()
 {
     using (game = new OctoGame())
         game.Run(60, 60);
 }
Beispiel #5
0
 public static void Restart()
 {
     game.Exit();
     using (game = new OctoGame())
         game.Run();
 }
Beispiel #6
0
 static void Main()
 {
     using (game = new OctoGame())
         game.Run();
 }