Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
 public static void Restart()
 {
     game.Exit();
     using (game = new OctoGame())
         game.Run(60, 60);
 }
Exemplo n.º 3
0
 static void Main()
 {
     using (var game = new OctoGame())
         game.Run();
 }
Exemplo n.º 4
0
 static void Main()
 {
     using (game = new OctoGame())
         game.Run(60, 60);
 }
Exemplo n.º 5
0
 public static void Restart()
 {
     game.Exit();
     using (game = new OctoGame())
         game.Run();
 }
Exemplo n.º 6
0
 static void Main()
 {
     using (game = new OctoGame())
         game.Run();
 }