private static void Main() { string location = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(location, "nlog.config")); Directory.SetCurrentDirectory(location); Console.Title = Title; log.Info("Initialising..."); try { ConfigManager.Initialise(Path.Combine(Directory.GetCurrentDirectory(), "Config.json")); PacketManager.Initialise(); DatabaseManager.Initialise(); DungeonTileManager.Initialise(); NetworkManager.Initialise(); WorldManager.Initialise(lastTick => { NetworkManager.Update(lastTick); FellowshipManager.Update(lastTick); ChannelManager.Update(lastTick); }); log.Info("Ready!"); } catch (Exception exception) { log.Error(exception); } }
private static void Main() { string location = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(location, "nlog.config")); Directory.SetCurrentDirectory(location); Console.Title = Title; log.Info("Initialising..."); try { ConfigManager.Initialise($"{Directory.GetCurrentDirectory()}\\Config.json"); DatabaseManager.Initialise(ConfigManager.Config.MySql); PacketManager.Initialise(); WorldManager.Initialise(); DungeonTileManager.Initialise(); NetworkManager.Initialise(); } catch (Exception exception) { log.Error(exception); } }