Пример #1
0
        public void OnEnter()
        {
            HUDBaseLayoutToolView baseLayoutToolView = Service.Get <UXController>().HUD.BaseLayoutToolView;

            baseLayoutToolView.ConfigureBaseLayoutToolStateHUD();
            BaseLayoutToolController baseLayoutToolController = Service.Get <BaseLayoutToolController>();

            baseLayoutToolController.EnterBaseLayoutTool();
            baseLayoutToolController.PauseContractsOnAllBuildings();
            baseLayoutToolController.UpdateLastSavedMap();
            Service.Get <DroidController>().HideAllNonClearableDroids();
            string pref = Service.Get <SharedPlayerPrefs>().GetPref <string>("SkipBLTIntro");

            if (pref != "1")
            {
                Lang   lang    = Service.Get <Lang>();
                string title   = lang.Get("blt_popup_title", new object[0]);
                string message = lang.Get("blt_popup_body", new object[0]);
                AlertWithCheckBoxScreen screen = new AlertWithCheckBoxScreen(title, message, "SKIP_FUTURE_CONFIRMATION", new AlertWithCheckBoxScreen.OnCheckBoxScreenModalResult(this.OnInfoPopupClosed));
                Service.Get <ScreenController>().AddScreen(screen);
            }
            baseLayoutToolView.RefreshStashModeCheckBox();
            baseLayoutToolView.RefreshSaveLayoutButtonStatus();
            this.SaveBLTSeenSharedPref();
            Service.Get <ChampionController>().DestroyAllChampionEntities();
        }
Пример #2
0
        public void OnExit(IState nextState)
        {
            BaseLayoutToolController baseLayoutToolController = Service.Get <BaseLayoutToolController>();

            baseLayoutToolController.ClearStashedBuildings();
            HUDBaseLayoutToolView baseLayoutToolView = Service.Get <UXController>().HUD.BaseLayoutToolView;

            baseLayoutToolView.ClearStashedBuildingTray();
            baseLayoutToolView.UnregisterObservers();
            WarBaseEditController warBaseEditController = Service.Get <WarBaseEditController>();

            warBaseEditController.ExitWarBaseEditing();
            this.CleanupBaseEditing();
            Service.Get <UXController>().MiscElementsManager.HideEventsTickerView();
        }
Пример #3
0
        private void SetupEditingMode()
        {
            this.SetupBaseEditing();
            HUDBaseLayoutToolView baseLayoutToolView = Service.Get <UXController>().HUD.BaseLayoutToolView;

            baseLayoutToolView.ConfigureBaseLayoutToolStateHUD();
            baseLayoutToolView.RegisterObservers();
            WarBaseEditController warBaseEditController = Service.Get <WarBaseEditController>();

            warBaseEditController.EnterWarBaseEditing(this.warBaseMap);
            this.warBaseMap = null;
            Service.Get <UXController>().MiscElementsManager.AddSquadWarTickerStatus();
            BaseLayoutToolController baseLayoutToolController = Service.Get <BaseLayoutToolController>();

            baseLayoutToolController.UpdateLastSavedMap();
            Service.Get <DroidController>().HideAllNonClearableDroids();
            baseLayoutToolView.RefreshStashModeCheckBox();
            baseLayoutToolView.RefreshSaveLayoutButtonStatus();
            Service.Get <ChampionController>().DestroyAllChampionEntities();
            warBaseEditController.CheckForNewBuildings();
        }