Exemple #1
0
        protected virtual void OnInstantUpgradeButtonClicked(UXButton button)
        {
            if (!this.HasEnoughResourceCapacityToUpgrade(this.nextBuildingInfo))
            {
                CurrencyType currencyType = GameUtils.GetCurrencyType(this.nextBuildingInfo.UpgradeCredits, this.nextBuildingInfo.UpgradeMaterials, this.nextBuildingInfo.UpgradeContraband);
                Service.ICurrencyController.HandleUnableToCollect(currencyType);
                return;
            }
            int num = GameUtils.CrystalCostToInstantUpgrade(this.nextBuildingInfo);

            if (num >= GameConstants.CRYSTAL_SPEND_WARNING_MINIMUM)
            {
                FinishNowScreen.ShowModalWithNoContract(this.selectedBuilding, new OnScreenModalResult(this.ConfirmInstantUpgrade), null, num);
                return;
            }
            this.ConfirmInstantUpgrade(true, null);
        }
Exemple #2
0
        protected override void OnInstantUpgradeButtonClicked(UXButton button)
        {
            if (!base.HasEnoughResourceCapacityToUpgrade(this.nextBuildingInfo))
            {
                CurrencyType currencyType = GameUtils.GetCurrencyType(this.nextBuildingInfo.UpgradeCredits, this.nextBuildingInfo.UpgradeMaterials, this.nextBuildingInfo.UpgradeContraband);
                Service.ICurrencyController.HandleUnableToCollect(currencyType);
                return;
            }
            int             num = GameUtils.CrystalCostToInstantUpgrade(this.nextBuildingInfo);
            string          planetDisplayName = LangUtils.GetPlanetDisplayName(this.selectedPlanet);
            string          text            = this.lang.ThousandsSeparated(num);
            FinishNowScreen finishNowScreen = FinishNowScreen.ShowModalWithNoContract(this.selectedBuilding, new OnScreenModalResult(base.ConfirmInstantUpgrade), null, num, this.lang.Get("PLANETS_GNC_UNLOCK_MODAL_TITLE", new object[0]), this.lang.Get("PLANETS_GNC_INSTANT_MODAL_DESC", new object[]
            {
                text,
                planetDisplayName
            }), true);

            finishNowScreen.SetTextureInset("PlanetEnvIcon-" + this.selectedPlanet.Abbreviation);
        }
Exemple #3
0
 public unsafe static long $Invoke12(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(FinishNowScreen.ShowModalWithNoContract((Entity)GCHandledObjects.GCHandleToObject(*args), (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[1]), GCHandledObjects.GCHandleToObject(args[2]), *(int *)(args + 3), Marshal.PtrToStringUni(*(IntPtr *)(args + 4)), Marshal.PtrToStringUni(*(IntPtr *)(args + 5)), *(sbyte *)(args + 6) != 0)));
 }
Exemple #4
0
 public unsafe static long $Invoke11(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(FinishNowScreen.ShowModalWithNoContract((Entity)GCHandledObjects.GCHandleToObject(*args), (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[1]), GCHandledObjects.GCHandleToObject(args[2]), *(int *)(args + 3))));
 }