コード例 #1
0
 private void OnPayMeForCurrencyResult(object result, object cookie)
 {
     if (GameUtils.HandleSoftCurrencyFlow(result, cookie) && !PayMeScreen.ShowIfNoFreeDroids(new OnScreenModalResult(this.OnPayMeForDroidResult), null))
     {
         this.ConfirmUpgrade();
     }
 }
コード例 #2
0
 protected override void OnPayMeForCurrencyResult(object result, object cookie)
 {
     if (GameUtils.HandleSoftCurrencyFlow(result, cookie) && !PayMeScreen.ShowIfNoFreeDroids(new OnScreenModalResult(this.OnPayMeForDroidResult), null))
     {
         this.OnUpgradeButtonClicked(null);
     }
 }
コード例 #3
0
 private void OnSwapPayMeForCurrencyResult(object result, object cookie)
 {
     if (GameUtils.HandleSoftCurrencyFlow(result, cookie) && !PayMeScreen.ShowIfNoFreeDroids(new OnScreenModalResult(this.OnSwapPayMeForDroidResult), null))
     {
         this.OnSwapStartContractSuccess();
     }
 }
コード例 #4
0
        protected override void OnPurchaseClicked(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);

            if (PayMeScreen.ShowIfNotEnoughCurrency(upgradeCredits, upgradeMaterials, upgradeContraband, buildingPurchaseContext, new OnScreenModalResult(this.OnPayMeForCurrencyResult)))
            {
                return;
            }
            if (PayMeScreen.ShowIfNoFreeDroids(new OnScreenModalResult(this.OnPayMeForDroidResult), null))
            {
                return;
            }
            this.ConfirmUpgrade();
        }
コード例 #5
0
        private void OnSwapConfirmButtonClicked(UXButton button)
        {
            if (this.selectedTurret == null)
            {
                return;
            }
            BuildingTypeVO buildingInfo            = this.selectedTurret.BuildingInfo;
            int            swapCredits             = buildingInfo.SwapCredits;
            int            swapMaterials           = buildingInfo.SwapMaterials;
            int            swapContraband          = buildingInfo.SwapContraband;
            string         buildingPurchaseContext = GameUtils.GetBuildingPurchaseContext(buildingInfo, this.buildingInfo, false, true);

            if (PayMeScreen.ShowIfNotEnoughCurrency(swapCredits, swapMaterials, swapContraband, buildingPurchaseContext, new OnScreenModalResult(this.OnSwapPayMeForCurrencyResult)))
            {
                return;
            }
            if (PayMeScreen.ShowIfNoFreeDroids(new OnScreenModalResult(this.OnSwapPayMeForDroidResult), null))
            {
                return;
            }
            this.OnSwapStartContractSuccess();
        }
コード例 #6
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);
        }
コード例 #7
0
ファイル: PayMeScreen.cs プロジェクト: Hengle/swc-decompiled
 public unsafe static long $Invoke6(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(PayMeScreen.ShowIfNoFreeDroids((OnScreenModalResult)GCHandledObjects.GCHandleToObject(*args), GCHandledObjects.GCHandleToObject(args[1]))));
 }