private void OnPayMeForCurrencyResult(object result, object cookie) { if (GameUtils.HandleSoftCurrencyFlow(result, cookie) && !PayMeScreen.ShowIfNoFreeDroids(new OnScreenModalResult(this.OnPayMeForDroidResult), null)) { this.ConfirmUpgrade(); } }
protected override void OnPayMeForCurrencyResult(object result, object cookie) { if (GameUtils.HandleSoftCurrencyFlow(result, cookie) && !PayMeScreen.ShowIfNoFreeDroids(new OnScreenModalResult(this.OnPayMeForDroidResult), null)) { this.OnUpgradeButtonClicked(null); } }
private void OnSwapPayMeForCurrencyResult(object result, object cookie) { if (GameUtils.HandleSoftCurrencyFlow(result, cookie) && !PayMeScreen.ShowIfNoFreeDroids(new OnScreenModalResult(this.OnSwapPayMeForDroidResult), null)) { this.OnSwapStartContractSuccess(); } }
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(); }
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(); }
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); }
public unsafe static long $Invoke6(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(PayMeScreen.ShowIfNoFreeDroids((OnScreenModalResult)GCHandledObjects.GCHandleToObject(*args), GCHandledObjects.GCHandleToObject(args[1])))); }