Created
April 15, 2018 18:23
-
-
Save JakubMifek/de6187cb573db8978137eb87179b38a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void Main() | |
{ | |
Config.Instance.Load("config.config"); | |
AppDomain.CurrentDomain.ProcessExit += (sender, args) => | |
{ | |
Config.Instance.Save("config.config"); | |
Config.Instance["exit"] = true; | |
}; | |
MainLogger.Instance.Log("Program", Priority.Info, "Program has started."); | |
try | |
{ | |
using (Game = new GameInterface()) | |
{ | |
Game.Run(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
MainLogger.Instance.Log(nameof(Program), Priority.Error, $"Program exited with error: '{ex.Message}'"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment