示例#1
0
        void Setup()
        {
            Instance   = this;
            GameObject = new GameObject();

            Areas    = new AreaManager();
            Factions = new FactionManager();
            Hud      = new HudManager();
            Pins     = new PinManager();
            Users    = new UserManager();
            Wars     = new WarManager();
            Zones    = new ZoneManager();

            Factions.Init(TryLoad <FactionInfo>(FactionsFile));
            Areas.Init(TryLoad <AreaInfo>(AreasFile));
            Pins.Init(TryLoad <PinInfo>(PinsFile));
            Users.Init();
            Wars.Init(TryLoad <WarInfo>(WarsFile));
            Zones.Init();
            Hud.Init();

            Hud.GenerateMapOverlayImage();

            if (Options.Upkeep.Enabled)
            {
                UpkeepCollectionTimer = timer.Every(Options.Upkeep.CheckIntervalMinutes * 60, Upkeep.CollectForAllFactions);
            }

            PrintToChat($"{Title} v{Version} initialized.");
            Ready = true;
        }