예제 #1
0
        private void OnTutorialConfirmClicked(UXButton button)
        {
            string planetDisplayName    = LangUtils.GetPlanetDisplayName(this.selectedPlanet);
            string planetDisplayNameKey = LangUtils.GetPlanetDisplayNameKey(this.selectedPlanet.Uid);

            Service.SharedPlayerPrefs.SetPref("1stPlaName", planetDisplayNameKey);
            Service.SharedPlayerPrefs.SetPref("1stPlaUid", this.selectedPlanet.Uid);
            AlertScreen alertScreen = AlertScreen.ShowModal(false, this.lang.Get("PLANETS_GNC_UNLOCK_MODAL_TITLE", new object[0]), this.lang.Get("PLANETS_GNC_TUTORIAL_MESSAGE", new object[]
            {
                planetDisplayName
            }), new OnScreenModalResult(this.OnConfirmation), this.selectedPlanet);

            alertScreen.AllowFUEBackButton = true;
            alertScreen.Tag = "Tutorial";
            alertScreen.SetPrimaryLabelText(this.lang.Get("s_Confirm", new object[0]));
            alertScreen.SetTextureInset("PlanetEnvIcon-" + this.selectedPlanet.Abbreviation);
        }
예제 #2
0
        protected override void OnUpgradeButtonClicked(UXButton button)
        {
            int    upgradeCredits          = this.nextBuildingInfo.UpgradeCredits;
            int    upgradeMaterials        = this.nextBuildingInfo.UpgradeMaterials;
            int    upgradeContraband       = this.nextBuildingInfo.UpgradeContraband;
            string buildingPurchaseContext = GameUtils.GetBuildingPurchaseContext(this.nextBuildingInfo, this.buildingInfo, true, false, this.selectedPlanet);

            if (PayMeScreen.ShowIfNotEnoughCurrency(upgradeCredits, upgradeMaterials, upgradeContraband, buildingPurchaseContext, new OnScreenModalResult(this.OnPayMeForCurrencyResult)))
            {
                return;
            }
            if (PayMeScreen.ShowIfNoFreeDroids(new OnScreenModalResult(this.OnPayMeForDroidResult), null))
            {
                return;
            }
            string      planetDisplayName = LangUtils.GetPlanetDisplayName(this.selectedPlanet);
            AlertScreen alertScreen       = AlertScreen.ShowModal(false, this.lang.Get("PLANETS_GNC_UNLOCK_MODAL_TITLE", new object[0]), this.lang.Get("PLANETS_GNC_UNLOCK_MODAL_DESC", new object[]
            {
                planetDisplayName
            }), new OnScreenModalResult(this.OnConfirmation), this.selectedPlanet);

            alertScreen.SetPrimaryLabelText(this.lang.Get("s_Confirm", new object[0]));
            alertScreen.SetTextureInset("PlanetEnvIcon-" + this.selectedPlanet.Abbreviation);
        }