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); } }
public static void Restart() { game.Exit(); using (game = new OctoGame()) game.Run(60, 60); }
static void Main() { using (var game = new OctoGame()) game.Run(); }
static void Main() { using (game = new OctoGame()) game.Run(60, 60); }
public static void Restart() { game.Exit(); using (game = new OctoGame()) game.Run(); }
static void Main() { using (game = new OctoGame()) game.Run(); }