예제 #1
0
        private void OpenRelocateView(string data)
        {
            string text = Service.CurrentPlayer.PlanetId;
            CampaignScreenSection section = CampaignScreenSection.Main;

            if (!string.IsNullOrEmpty(data))
            {
                string[] array = data.Split(new char[]
                {
                    '|'
                });
                if (array.Length >= 1)
                {
                    text = array[0];
                }
            }
            bool flag = Service.BuildingLookupController.HasNavigationCenter();

            if (flag)
            {
                if (this.holonetScreen != null)
                {
                    this.holonetScreen.Close(null);
                }
                Service.GalaxyViewController.GoToPlanetView(text, section);
                PlanetVO planetVO = Service.StaticDataController.Get <PlanetVO>(text);
                ConfirmRelocateScreen.ShowModal(planetVO, null, null);
            }
            else
            {
                Service.UXController.MiscElementsManager.ShowPlayerInstructionsError(Service.Lang.Get("HOLONET_RELOCATE_NO_PC", new object[0]));
            }
        }
예제 #2
0
        private void OpenPlanetView(string data)
        {
            string text = Service.CurrentPlayer.PlanetId;
            CampaignScreenSection section = CampaignScreenSection.Main;
            bool flag = Service.BuildingLookupController.HasNavigationCenter();

            if (!string.IsNullOrEmpty(data))
            {
                string[] array = data.Split(new char[]
                {
                    '|'
                });
                if (array.Length >= 1)
                {
                    text = array[0];
                }
            }
            if (flag || text == "planet1")
            {
                this.holonetScreen.Close(null);
                Service.GalaxyViewController.GoToPlanetView(text, section);
            }
            else
            {
                AlertScreen.ShowModal(false, Service.Lang.Get("hn_upgrade_required", new object[0]), Service.Lang.Get("hn_noPC", new object[0]), null, null);
            }
        }
예제 #3
0
 public override void OnDestroyElement()
 {
     this.currentSection = CampaignScreenSection.Main;
     this.GoToMainSelectScreen();
     this.pveView.Destroy();
     this.chaptersView.Destroy();
     this.planetInfoView.Destroy();
     this.featuredView.Destroy();
     base.OnDestroyElement();
 }
예제 #4
0
        public void CloseSubScreenAndReturnToMainSelect()
        {
            CampaignScreenSection campaignScreenSection = this.currentSection;

            if (campaignScreenSection == CampaignScreenSection.Campaign)
            {
                this.pveView.ReturnToMainSelect();
                return;
            }
            this.GoToMainSelectScreen();
        }