protected override void Setup() { instance = this; log4net.GlobalContext.Properties["Photon:ApplicationLogPath"] = Path.Combine(this.ApplicationPath, "log"); string path = Path.Combine(this.BinaryPath, "log4net.config"); FileInfo file = new FileInfo(path); if (file.Exists) { LogManager.SetLoggerFactory(Log4NetLoggerFactory.Instance); XmlConfigurator.ConfigureAndWatch(file); } playerManager = new PlayerManager(); database = new MySQLDatabase(); if (database.Connect("localhost", "root", "IANT", "iant")) { Log.Info("Database Connect successiful!......."); } else { Log.Error("Database connect fail"); } Log.Info("Server Setup successiful!......."); TowerUpgradeConfiguration.Load(); }
private void OnGetConfigurations(TowerUpgradeConfigurationContent content) { TowerUpgradeConfiguration.Load(content); IANTGame.IsLoadedConfigurations = true; startMenuUI.LoadedConfigurations(); }