fix:1、更换项目,使用winter来创建
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FairyGUI;
|
||||
using FGUI.P01_Common;
|
||||
using FGUI.ZM_Common_01;
|
||||
using SGModule.NetKit;
|
||||
|
||||
namespace FlowerPower
|
||||
namespace LoveLegend
|
||||
{
|
||||
public class PassunlockUI : BaseUI
|
||||
{
|
||||
private PassunlockUICtrl ctrl;
|
||||
private PassunlockModel model;
|
||||
private FGUI.P17_PackAward.com_passunlock ui;
|
||||
private FGUI.ZM_Pack_16.com_passunlock ui;
|
||||
|
||||
public btn_watchAd btn_WatchAd;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace FlowerPower
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "P17_PackAward";
|
||||
uiInfo.packageName = "ZM_Pack_16";
|
||||
uiInfo.assetName = "com_passunlock";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
@@ -37,42 +37,46 @@ namespace FlowerPower
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
AdRdManager.Instance.Destroy();
|
||||
GameHelper.CallShowTurn();
|
||||
AdExchangeManager.Instance.Destroy();
|
||||
GameHelper.CallShowTurn();
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.P17_PackAward.com_passunlock;
|
||||
ui = baseUI as FGUI.ZM_Pack_16.com_passunlock;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (GameHelper.IsAdModelOfPay()) {
|
||||
ui.pay_type.selectedIndex = 0;
|
||||
AdRdManager.Instance.SetWatchAd(PurchasingManager.battle_pass, ui.btn_buypass as btn_watchAd,SetTextString);
|
||||
AdExchangeManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.battle_pass), ui.btn_buypass as btn_watchAd,SetTextString);
|
||||
|
||||
AdRdManager.Instance.Start();
|
||||
AdExchangeManager.Instance.Start();
|
||||
SetTextString();
|
||||
|
||||
} else {
|
||||
ui.pay_type.selectedIndex = 1;
|
||||
decimal price = (decimal)GameHelper.GetCommonModel().Passportgift2;
|
||||
ui.btn_max_pay.title = GameHelper.getPrice(price);
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_max_pay.GetChild("img_saveingpot") as GImage).visible = true;
|
||||
ui.btn_max_pay.title = GameHelper.Get102Str(price);
|
||||
|
||||
ui.btn_max_pay.SetClick(() => {
|
||||
ApplePayClass maxPayData = new ApplePayClass
|
||||
{
|
||||
amount = (int)Math.Round(price * 100),
|
||||
sku = PurchasingManager.battle_pass,
|
||||
sku = PurchasingManager.GetPaySku(PayType.battle_pass),
|
||||
currency = "USD"
|
||||
};
|
||||
MaxPayManager.Instance.Buy(maxPayData);
|
||||
});
|
||||
}
|
||||
|
||||
ui.gift_switch.selectedIndex = GameHelper.IsGiftSwitch() ? 1 : 0;
|
||||
InitView();
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.pass_show, 1);
|
||||
TrackKit.SendEvent(GameHelper.GetEventName(), ADEventTrack.Property.master_pass_show);
|
||||
|
||||
var fileName = GameHelper.GetBackgroundName(3);
|
||||
TextureHelper.SetImgLoader(ui.loader.picture, fileName, null, "Background/", FolderNames.BackgroundName);
|
||||
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -102,17 +106,15 @@ namespace FlowerPower
|
||||
{
|
||||
string type = (string)str;
|
||||
string purch_number = "";
|
||||
if (type == PurchasingManager.battle_pass)
|
||||
{
|
||||
|
||||
purch_number = ConfigSystem.GetConfig<CommonModel>().Passportgift2.ToString();
|
||||
if (type == PurchasingManager.GetPaySku(PayType.battle_pass))
|
||||
{
|
||||
CtrlCloseUI();
|
||||
}
|
||||
|
||||
if (purch_number != "")
|
||||
{
|
||||
GameHelper.SendRevenueToAF(purch_number);
|
||||
}
|
||||
// if (purch_number != "")
|
||||
// {
|
||||
// GameHelper.SendRevenueToAF(purch_number);
|
||||
// }
|
||||
}
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
@@ -120,7 +122,7 @@ namespace FlowerPower
|
||||
ui.btn_close.SetClick(CtrlCloseUI);
|
||||
int gold = 0;
|
||||
|
||||
List<Passportrewards> Passportrewards_list = ConfigSystem.GetConfig<PassportrewardsModel>().dataList;
|
||||
List<Passportrewards> Passportrewards_list = ConfigSystem.GetConfig<Passportrewards>();
|
||||
for (int i = 0; i < Passportrewards_list.Count; i++)
|
||||
{
|
||||
|
||||
@@ -134,11 +136,11 @@ namespace FlowerPower
|
||||
|
||||
public void SetTextString()
|
||||
{
|
||||
var need = AdRdManager.Instance.GetCeilingNeedAds(PurchasingManager.battle_pass);
|
||||
var myAd = AdRdManager.Instance.GetLookRewardADNum();
|
||||
var need = AdExchangeManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.battle_pass));
|
||||
var myAd = AdExchangeManager.Instance.GetLookRewardADNum();
|
||||
|
||||
ui.tips.SetVar("num", need.ToString()).FlushVars();
|
||||
ui.ads.SetVar("num", myAd.ToString()).FlushVars();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user