fix:1、多语言添加

This commit is contained in:
2026-07-07 17:04:11 +08:00
parent 09c02d51f7
commit 03b3ad4364
76 changed files with 41664 additions and 43127 deletions
@@ -28,8 +28,6 @@ namespace ChillConnect
public const string SaveingPotCtrl = "SaveingPotCtrl";
public const string ResurgenceCtrl = "ResurgenceCtrl";
public const string FirstRewardCtrl = "FirstRewardCtrl";
public const string PassViewCtrl = "PassViewCtrl";
public const string PassunlockCtrl = "PassunlockCtrl";
public const string BroadcastCtrl = "BroadcastCtrl";
public const string RecordViewCtrl = "RecordViewCtrl";
public const string AdcomingCtrl = "AdcomingCtrl";
@@ -27,8 +27,6 @@ namespace ChillConnect
public const string SaveingPotModel = "SaveingPotModel";
public const string ResurgenceModel = "ResurgenceModel";
public const string FirstRewardModel = "FirstRewardModel";
public const string PassViewModel = "PassViewModel";
public const string PassunlockModel = "PassunlockModel";
public const string BroadcastModel = "BroadcastModel";
public const string RecordViewModel = "RecordViewModel";
public const string AdcomingModel = "AdcomingModel";
@@ -22,7 +22,6 @@ namespace ChillConnect
moduleManager.AddModel(ModelConst.RewardboxModel, new RewardboxModel());
moduleManager.AddModel(ModelConst.PayloadingModel, new PayloadingModel());
moduleManager.AddModel(ModelConst.FXWndModel, new FXWndModel());
moduleManager.AddModel(ModelConst.BuygoldModel, new BuygoldModel());
moduleManager.AddModel(ModelConst.GameMenuModel, new GameMenuModel());
moduleManager.AddModel(ModelConst.PersonViewModel, new PersonViewModel());
moduleManager.AddModel(ModelConst.TipsViewModel, new TipsViewModel());
@@ -30,14 +29,10 @@ namespace ChillConnect
moduleManager.AddModel(ModelConst.SignInViewModel, new SignInViewModel());
moduleManager.AddModel(ModelConst.MakeupConfirmModel, new MakeupConfirmModel());
moduleManager.AddModel(ModelConst.SaveingPotModel, new SaveingPotModel());
moduleManager.AddModel(ModelConst.ResurgenceModel, new ResurgenceModel());
moduleManager.AddModel(ModelConst.FirstRewardModel, new FirstRewardModel());
moduleManager.AddModel(ModelConst.PassViewModel, new PassViewModel());
moduleManager.AddModel(ModelConst.PassunlockModel, new PassunlockModel());
moduleManager.AddModel(ModelConst.BroadcastModel, new BroadcastModel());
moduleManager.AddModel(ModelConst.RecordViewModel, new RecordViewModel());
moduleManager.AddModel(ModelConst.AdcomingModel, new AdcomingModel());
moduleManager.AddModel(ModelConst.AddViewoffModel, new AddViewoffModel());
moduleManager.AddModel(ModelConst.GoldRewardModel, new GoldRewardModel());
moduleManager.AddModel(ModelConst.NewTaskModel, new NewTaskModel());
moduleManager.AddModel(ModelConst.GetTaskRewardModel, new GetTaskRewardModel());
@@ -69,7 +64,6 @@ namespace ChillConnect
moduleManager.AddUICtrl(UICtrlConst.RewardboxUICtrl, new RewardboxUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PayloadingUICtrl, new PayloadingUICtrl());
moduleManager.AddUICtrl(UICtrlConst.FXWndUICtrl, new FXWndUICtrl());
moduleManager.AddUICtrl(UICtrlConst.BuygoldUICtrl, new BuygoldUICtrl());
moduleManager.AddUICtrl(UICtrlConst.GameMenuUICtrl, new GameMenuUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PersonViewUICtrl, new PersonViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.TipsViewUICtrl, new TipsViewUICtrl());
@@ -77,14 +71,10 @@ namespace ChillConnect
moduleManager.AddUICtrl(UICtrlConst.SignInViewUICtrl, new SignInViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.MakeupConfirmUICtrl, new MakeupConfirmUICtrl());
moduleManager.AddUICtrl(UICtrlConst.SaveingPotUICtrl, new SaveingPotUICtrl());
moduleManager.AddUICtrl(UICtrlConst.ResurgenceUICtrl, new ResurgenceUICtrl());
moduleManager.AddUICtrl(UICtrlConst.FirstRewardUICtrl, new FirstRewardUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PassViewUICtrl, new PassViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PassunlockUICtrl, new PassunlockUICtrl());
moduleManager.AddUICtrl(UICtrlConst.BroadcastUICtrl, new BroadcastUICtrl());
moduleManager.AddUICtrl(UICtrlConst.RecordViewUICtrl, new RecordViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.AdcomingUICtrl, new AdcomingUICtrl());
moduleManager.AddUICtrl(UICtrlConst.AddViewoffUICtrl, new AddViewoffUICtrl());
moduleManager.AddUICtrl(UICtrlConst.GoldRewardUICtrl, new GoldRewardUICtrl());
moduleManager.AddUICtrl(UICtrlConst.NewTaskUICtrl, new NewTaskUICtrl());
moduleManager.AddUICtrl(UICtrlConst.GetTaskRewardUICtrl, new GetTaskRewardUICtrl());
@@ -119,7 +109,6 @@ namespace ChillConnect
moduleManager.AddCtrl(CtrlConst.RewardboxCtrl, new RewardboxCtrl());
moduleManager.AddCtrl(CtrlConst.PayloadingCtrl, new PayloadingCtrl());
moduleManager.AddCtrl(CtrlConst.FXWndCtrl, new FXWndCtrl());
moduleManager.AddCtrl(CtrlConst.BuygoldCtrl, new BuygoldCtrl());
moduleManager.AddCtrl(CtrlConst.GameMenuCtrl, new GameMenuCtrl());
moduleManager.AddCtrl(CtrlConst.PersonViewCtrl, new PersonViewCtrl());
moduleManager.AddCtrl(CtrlConst.TipsViewCtrl, new TipsViewCtrl());
@@ -127,14 +116,10 @@ namespace ChillConnect
moduleManager.AddCtrl(CtrlConst.SignInViewCtrl, new SignInViewCtrl());
moduleManager.AddCtrl(CtrlConst.MakeupConfirmCtrl, new MakeupConfirmCtrl());
moduleManager.AddCtrl(CtrlConst.SaveingPotCtrl, new SaveingPotCtrl());
moduleManager.AddCtrl(CtrlConst.ResurgenceCtrl, new ResurgenceCtrl());
moduleManager.AddCtrl(CtrlConst.FirstRewardCtrl, new FirstRewardCtrl());
moduleManager.AddCtrl(CtrlConst.PassViewCtrl, new PassViewCtrl());
moduleManager.AddCtrl(CtrlConst.PassunlockCtrl, new PassunlockCtrl());
moduleManager.AddCtrl(CtrlConst.BroadcastCtrl, new BroadcastCtrl());
moduleManager.AddCtrl(CtrlConst.RecordViewCtrl, new RecordViewCtrl());
moduleManager.AddCtrl(CtrlConst.AdcomingCtrl, new AdcomingCtrl());
moduleManager.AddCtrl(CtrlConst.AddViewoffCtrl, new AddViewoffCtrl());
moduleManager.AddCtrl(CtrlConst.GoldRewardCtrl, new GoldRewardCtrl());
moduleManager.AddCtrl(CtrlConst.NewTaskCtrl, new NewTaskCtrl());
moduleManager.AddCtrl(CtrlConst.GetTaskRewardCtrl, new GetTaskRewardCtrl());
@@ -167,7 +152,6 @@ namespace ChillConnect
moduleManager.AddUIType(UIConst.OpenGameUI, typeof(OpenGameUI));
moduleManager.AddUIType(UIConst.RewardboxUI, typeof(RewardboxUI));
moduleManager.AddUIType(UIConst.PayloadingUI, typeof(PayloadingUI));
moduleManager.AddUIType(UIConst.BuygoldUI, typeof(BuygoldUI));
moduleManager.AddUIType(UIConst.GameMenuUI, typeof(GameMenuUI));
moduleManager.AddUIType(UIConst.PersonViewUI, typeof(PersonViewUI));
moduleManager.AddUIType(UIConst.TipsViewUI, typeof(TipsViewUI));
@@ -175,14 +159,10 @@ namespace ChillConnect
moduleManager.AddUIType(UIConst.SignInViewUI, typeof(SignInViewUI));
moduleManager.AddUIType(UIConst.MakeupConfirmUI, typeof(MakeupConfirmUI));
moduleManager.AddUIType(UIConst.SaveingPotUI, typeof(SaveingPotUI));
moduleManager.AddUIType(UIConst.ResurgenceUI, typeof(ResurgenceUI));
moduleManager.AddUIType(UIConst.FirstRewardUI, typeof(FirstRewardUI));
moduleManager.AddUIType(UIConst.PassViewUI, typeof(PassViewUI));
moduleManager.AddUIType(UIConst.PassunlockUI, typeof(PassunlockUI));
moduleManager.AddUIType(UIConst.BroadcastUI, typeof(BroadcastUI));
moduleManager.AddUIType(UIConst.RecordViewUI, typeof(RecordViewUI));
moduleManager.AddUIType(UIConst.AdcomingUI, typeof(AdcomingUI));
moduleManager.AddUIType(UIConst.AddViewoffUI, typeof(AddViewoffUI));
moduleManager.AddUIType(UIConst.GoldRewardUI, typeof(GoldRewardUI));
moduleManager.AddUIType(UIConst.NewTaskUI, typeof(NewTaskUI));
moduleManager.AddUIType(UIConst.GetTaskRewardUI, typeof(GetTaskRewardUI));
-2
View File
@@ -18,8 +18,6 @@ namespace ChillConnect
public const string OpenGameUI = "OpenGameUI";
public const string RewardboxUI = "RewardboxUI";
public const string PayloadingUI = "PayloadingUI";
public const string PassViewUI = "PassViewUI";
public const string PassunlockUI = "PassunlockUI";
public const string BuygoldUI = "BuygoldUI";
public const string GameMenuUI = "GameMenuUI";
public const string PersonViewUI = "PersonViewUI";
@@ -28,8 +28,6 @@ namespace ChillConnect
public const string SaveingPotUICtrl = "SaveingPotUICtrl";
public const string ResurgenceUICtrl = "ResurgenceUICtrl";
public const string FirstRewardUICtrl = "FirstRewardUICtrl";
public const string PassViewUICtrl = "PassViewUICtrl";
public const string PassunlockUICtrl = "PassunlockUICtrl";
public const string BroadcastUICtrl = "BroadcastUICtrl";
public const string RecordViewUICtrl = "RecordViewUICtrl";
public const string AdcomingUICtrl = "AdcomingUICtrl";
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: d9d0bb86413f7ae46bd45ac817d2a778
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,25 +0,0 @@
namespace ChillConnect
{
public class AddViewoffCtrl : BaseCtrl
{
public static AddViewoffCtrl Instance { get; private set; }
private AddViewoffModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.AddViewoffModel) as AddViewoffModel;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6254fab7306ab4f54b9ddc37e9f9c554
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,20 +0,0 @@
namespace ChillConnect
{
public class AddViewoffModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 8927197c6cb1f412d83d93ded8cf1589
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,225 +0,0 @@
using System;
using System.Collections.Generic;
using FairyGUI;
using FGUI.AddCell_12;
using FGUI.Common_01;
using IgnoreOPS;
using SGModule.Net;
using SGModule.NetKit;
namespace ChillConnect
{
public class AddViewoffUI : BaseUI
{
private AddViewoffUICtrl ctrl;
private AddViewoffModel model;
private com_addView_off ui;
public AddViewoffUI(AddViewoffUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.AddViewoffUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "AddCell_12";
uiInfo.assetName = "com_addView_off";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddViewoffModel) as AddViewoffModel;
}
protected override void OnClose()
{
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= updateWatchCD;
if (GameHelper.IsAdModelOfPay())
{
AdRedeemManager.Instance.Destroy();
}
}
protected override void OnBind()
{
ui = baseUI as com_addView_off;
}
protected override void OnOpenBefore(object args)
{
// if (ui.btn_watch is btn_watchAd watchAdBtn)
// {
// CommonTools.GetInstance.InitAdBtnAnim(watchAdBtn.icon_Parent);
// }
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneOffClick);
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
(ui.btn_max_pay.GetChild("img_saveingpot") as GImage).visible = true;
}
// ad_cool_down = ConfigSystem.GetConfig<CommonModel>().exchangeCD;
// btn_WatchAd = ui.btn_watch as btn_watchAd;
if (GameHelper.IsAdModelOfPay())
{
AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.buy_one_off), ui.btn_watch as btn_watchAd, SetTextString);
ui.pay_type.selectedIndex = 0;
ui.text_old_price.text = GameHelper.GetCommonModel().addspace + "ADs";
btn_watchAd btn = ui.btn_watch as btn_watchAd;
btn.buy_type.selectedIndex = 1;
AdRedeemManager.Instance.Start();
SetTextString();
}
else
{
ui.pay_type.selectedIndex = 1;
ui.text_old_price.text = "$ " + GameHelper.GetCommonModel().addspace2;
decimal price = (decimal)GameHelper.GetCommonModel().AddDiscount2;
ui.btn_max_pay.title = GameHelper.getPrice(price);
ui.btn_max_pay.SetClick(() =>
{
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price * 100),
sku = PurchasingManager.GetPaySku(PayType.buy_one_off),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
InitBroadCast();
InitView();
if (GameHelper.IsGiftSwitch())
{
ui.broad.visible = true;
}
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
}
#endregion
void pay_success(object str)
{
string type = (string)str;
if (type == PurchasingManager.GetPaySku(PayType.buy_one_off))
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Close);
SaveData.GetSaveObject().have_slot = true;
SaveData.saveDataFunc();
GameDispatcher.Instance.Dispatch(GameMsg.Slot_refresh);
GameDispatcher.Instance.Dispatch(GameMsg.resurgence_close);
CtrlCloseUI();
}
}
//初始化页面逻辑
private void InitView()
{
// var tAnimation = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tip_parent, Fx_Type.Fx_AddBoxTip, ref _closeCallback);
// tAnimation.state.AddAnimation(0, "animation", true, 0);
ui.btn_close.SetClick(() =>
{
GameDispatcher.Instance.Dispatch(GameMsg.resurgence_close);
CtrlCloseUI();
});
HallManager.Instance.UpdateSecondEvent += updateWatchCD;
broadtime++;
BroadCast();
}
void updateWatchCD()
{
ui.text_time.text = CommonHelper.TimeFormat(SaveData.GetSaveObject().addview_off_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
public void SetTextString()
{
var need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.buy_one_off));
var myAd = AdRedeemManager.Instance.GetLookRewardADNum();
ui.tips.SetVar("num", need.ToString()).FlushVars();
ui.ads.SetVar("num", myAd + "/").FlushVars();
ui.ads.SetVar("num1", need.ToString()).FlushVars();
}
private int broadtime = 1;
private List<string> config_name_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_name_list;
private List<string> config_money_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_money_list;
private List<string[]> broad_list = new List<string[]>();
private void BroadCast()
{
if (broadtime % 3 == 0)
{
(ui.broad as com_broadcast_new).t1.Play(() =>
{
broad_list.RemoveAt(0);
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
for (int i = 0; i < 4; i++)
{
text_list[i].text = "Congratulations,User [color=#ad4800][size=36]" + broad_list[i][0] + "[/size][/color] !After purchasing the +1 Block Pack,play [color=#ad4800]" + broad_list[i][1] + "[/color] matcher to clear the level!";
}
});
}
}
private List<GTextField> text_list = new List<GTextField>();
private void InitBroadCast()
{
text_list.Add((ui.broad as com_broadcast_new).text_0);
text_list.Add((ui.broad as com_broadcast_new).text_1);
text_list.Add((ui.broad as com_broadcast_new).text_2);
text_list.Add((ui.broad as com_broadcast_new).text_3);
for (int i = 0; i < 4; i++)
{
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
text_list[i].text = "Congratulations,User [color=#ad4800][size=36]" + broad_list[i][0] + "[/size][/color] !After purchasing the +1 Block Pack,play [color=#ad4800]" + broad_list[i][1] + "[/color] matcher to clear the level!";
}
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 95a4ab1450a704a8a86208f20b15f859
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,73 +0,0 @@
namespace ChillConnect
{
public class AddViewoffUICtrl : BaseUICtrl
{
private AddViewoffUI ui;
private AddViewoffModel model;
private uint openUIMsg = UICtrlMsg.AddViewoffUI_Open;
private uint closeUIMsg = UICtrlMsg.AddViewoffUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddViewoffModel) as AddViewoffModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new AddViewoffUI(this);
ui.Open(args);
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 0482db053a1ce45d989a2e4a715dff81
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1293,7 +1293,7 @@ namespace ChillConnect
else if (type == 1)
{
_isDeleteMode = !_isDeleteMode;
GameHelper.ShowTips("You can delete any one of the arrows!");
GameHelper.ShowTips("delete_arrow", true);
}
}
@@ -115,9 +115,9 @@ namespace ChillConnect
{
AwardNum = 20;
AwardRate = 2;
ui.btn_claim.title = "Claim(" + AwardNum + ")";
ui.btn_claim.title = Language.GetContentParams("exchange_succ", AwardNum);
}
else ui.btn_claim.title = "Claim(" + GameHelper.getChString((decimal)AwardNum) + ")";
else ui.btn_claim.title = Language.GetContentParams("exchange_succ", GameHelper.getChString((decimal)AwardNum));
if (IsWin)
{
if (PlayerPrefs.GetFloat("soundVolume", 1.0f) > 0f)
@@ -153,7 +153,7 @@ namespace ChillConnect
((btn_claim)ui.com_arrow_end.btn_watchAd).state.selectedIndex = DataMgr.ArrowResultLevel.Value == 1 ? 1 : 0;
((btn_claim)ui.com_arrow_end.btn_watchAd).title = DataMgr.ArrowResultLevel.Value == 1 ? "Free Revive" : "Revive";
((btn_claim)ui.com_arrow_end.btn_watchAd).title = DataMgr.ArrowResultLevel.Value == 1 ? Language.GetContent("free_revive") : Language.GetContent("revive");
ui.com_arrow_end.btn_watchAd.SetClick(() =>
{
@@ -189,7 +189,7 @@ namespace ChillConnect
});
ui.btn_mult.GetChild("title").text = "Claim X" + AwardRate;
ui.btn_mult.GetChild("title").text = Language.GetContentParams("exchange_success", AwardRate);
if (SuccessDatas.IsH5Reward)
ui.com_ch.visible = false;
@@ -213,17 +213,17 @@ namespace ChillConnect
ui.text_chneedlv.text = str;
ui.lab_lv_need_des.SetVar("num", ConfigSystem.GetConfig<CommonModel>().ExpiryUnlock.ToString()).FlushVars();
Debug.Log(ConfigSystem.GetConfig<CommonModel>().ExpiryUnlock);
str = string.Format("Owner ADs: {0}/{1}", makeupTaskData.LvVideoCount, ConfigSystem.GetConfig<CommonModel>().ExpiryUnlock);
ui.lab_ads.text = str;
str = $"{makeupTaskData.LvVideoCount}/{ConfigSystem.GetConfig<CommonModel>().ExpiryUnlock}";
ui.lab_ads.text = Language.GetContentParams("owner_ad", str);
ui.text_nowch.text = GameHelper.Get102Str(DataMgr.Ticket.Value);
ui.text_ch_title.text = "Level " + vo.levels_need;
ui.text_ch_title.text = Language.GetContentParams("need_lv_text", vo.levels_need);
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
(ui.btn_watchad.GetChild("img_saveingpot") as GImage).visible = true;
}
if (GameHelper.GetLevel() <= vo.levels_need)
{
ui.btn_check_level.title = "Go";
ui.btn_check_level.title = Language.GetContentParams("go");
if (UIManager.Instance.IsExistUI(UIConst.RainPlayUI))
{
ui.btn_check_level.SetClick(() =>
@@ -317,10 +317,10 @@ namespace ChillConnect
ui.text_chneedlv.text = str;
ui.lab_lv_need_des.SetVar("num", ConfigSystem.GetConfig<CommonModel>().ExpiryUnlock.ToString()).FlushVars();
Debug.Log(ConfigSystem.GetConfig<CommonModel>().ExpiryUnlock);
str = string.Format("Owner ADs: {0}/{1}", makeupTaskData.LvVideoCount, ConfigSystem.GetConfig<CommonModel>().ExpiryUnlock);
ui.lab_ads.text = str;
str = $"{makeupTaskData.LvVideoCount}/{ ConfigSystem.GetConfig<CommonModel>().ExpiryUnlock}";
ui.lab_ads.text = Language.GetContentParams("owner_ad", str);
ui.text_nowch.text = GameHelper.Get102Str(DataMgr.Ticket.Value);
ui.text_ch_title.text = "Level " + vo.levels_need;
ui.text_ch_title.text = Language.GetContentParams("need_lv_text", vo.levels_need);
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
(ui.btn_watchad.GetChild("img_saveingpot") as GImage).visible = true;
@@ -328,7 +328,7 @@ namespace ChillConnect
if (GameHelper.GetLevel() <= vo.levels_need)
{
ui.btn_check_level.title = "Go";
ui.btn_check_level.title = Language.GetContentParams("go");
if (UIManager.Instance.IsExistUI(UIConst.RainPlayUI))
{
ui.btn_check_level.SetClick(() =>
@@ -434,9 +434,9 @@ namespace ChillConnect
now_selectindex = makeupTaskData.tableId - 1;
for (int i = 0; i < btn_list.Count; i++)
{
btn_list[i].text_level0.text = "Level " + makeup_list[i].levels_need;
btn_list[i].text_level1.text = "Level " + makeup_list[i].levels_need;
btn_list[i].text_level2.text = "Level " + makeup_list[i].levels_need;
btn_list[i].text_level0.text = Language.GetContentParams("need_lv_text", makeup_list[i].levels_need);
btn_list[i].text_level1.text = Language.GetContentParams("need_lv_text", makeup_list[i].levels_need);
btn_list[i].text_level2.text = Language.GetContentParams("need_lv_text", makeup_list[i].levels_need);
if (i < ch_index)
{
btn_list[i].img_check.visible = true;
@@ -461,7 +461,8 @@ namespace ChillConnect
int _temp_index = i;
btn_list[i].SetClick(() =>
{
GameHelper.ShowTips("Complete level " + makeup_list[_temp_index].levels_need + " to unlock.");
var tips = Language.GetContentParams("Complete_tips", makeup_list[_temp_index].levels_need);
GameHelper.ShowTips(tips);
});
}
else
@@ -535,27 +536,27 @@ namespace ChillConnect
var account = enter_input.text.Replace(" ", "");
if (account == null || account == "")
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
if (!GameHelper.CheckAccountValidly(account))
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
var fname = ui.com_fname.enter_fname.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(fname))
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
var lname = ui.com_lname.enter_lname.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(lname) && !AppConst.isPt())
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
@@ -1002,12 +1003,12 @@ namespace ChillConnect
if (makeupTaskData.rdData[index].isClaimed)
{
item.btn_claim.state.selectedIndex = 1;
item.btn_claim.title = "Claimed";
item.btn_claim.title = Language.GetContentParams("claimed");
}
else
{
item.btn_claim.state.selectedIndex = 0;
item.btn_claim.title = "Claim";
item.btn_claim.title = Language.GetContentParams("claim");
}
item.btn_claim.SetClick(() =>
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 4b132fae24eed5e4fbe37d0fa2073cd4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,41 +0,0 @@
namespace ChillConnect
{
public class PassViewCtrl : BaseCtrl
{
public static PassViewCtrl Instance { get; private set; }
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.NewTaskModel) as NewTaskModel;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: af1a764295dea4c48ad78b622d367f18
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,107 +0,0 @@
namespace ChillConnect
{
public class PassViewModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
// protected override void OnReset()
// {
// }
// #endregion
// #region 读取数据
// protected override void OnReadData()
// {
// }
// #endregion
// #region 本地存储
// protected override void WriteLocalStorage()
// {
// }
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
// private static string jsonFilePath = Path.Combine(Application.persistentDataPath, "taskrecord1.json");
// public static void saveRecord(List<int> list)
// {
// string save = JsonConvert.SerializeObject(list);
// Debug.Log(save);
// if (File.Exists(jsonFilePath)) File.Delete(jsonFilePath);
// File.WriteAllText(jsonFilePath, save);
// }
// public static List<int> getTaskRecord()
// {
// if (File.Exists(jsonFilePath))
// {
// string jsonstr = File.ReadAllText(jsonFilePath);
// Debug.Log("-------------------------");
// Debug.Log(jsonstr);
// return JsonConvert.DeserializeObject<List<int>>(jsonstr);
// //return JsonUtility.FromJson<MyData>(json);
// }
// else
// {
// Debug.Log("Data file not found!");
// return new List<int>();
// }
// }
// private static string jsonFilePath_time = Path.Combine(Application.persistentDataPath, "timerecord2.json");
// public static void saveTimeRecord(List<int> list)
// {
// string save = JsonConvert.SerializeObject(list);
// Debug.Log(save);
// if (File.Exists(jsonFilePath_time)) File.Delete(jsonFilePath_time);
// File.WriteAllText(jsonFilePath_time, save);
// }
// public static List<int> getTimeRecord()
// {
// if (File.Exists(jsonFilePath_time))
// {
// string jsonstr = File.ReadAllText(jsonFilePath_time);
// Debug.Log("-------------------------");
// Debug.Log(jsonstr);
// return JsonConvert.DeserializeObject<List<int>>(jsonstr);
// //return JsonUtility.FromJson<MyData>(json);
// }
// else
// {
// Debug.Log("Data file not found!");
// return new List<int>();
// }
// }
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4dfc98b349c82c8458a7101f96c8d132
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,619 +0,0 @@
using System;
using System.Collections.Generic;
using DG.Tweening;
using FairyGUI;
using FGUI.P14_PassView;
using IgnoreOPS;
using Spine.Unity;
using UnityEngine;
namespace ChillConnect
{
public class PassViewUI : BaseUI
{
private PassViewUICtrl ctrl;
private PassViewModel model;
private com_pass_view ui;
List<PassingTask> passing_list = new List<PassingTask>();
List<Durationtasks> Durationtasks_list = new List<Durationtasks>();
List<Passportrewards> Passportrewards_list = new List<Passportrewards>();
private Vector2 start_pos;
private Action closeCallback;
public PassViewUI(PassViewUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.PassViewUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "P14_PassView";
uiInfo.assetName = "com_pass_view";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
model = ModuleManager.Instance.GetModel(ModelConst.PassViewModel) as PassViewModel;
}
protected override void OnClose()
{
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= upData;
}
protected override void OnBind()
{
ui = baseUI as com_pass_view;
}
protected override void OnOpenBefore(object args)
{
if (Screen.safeArea.y != 0)
{
// ui.bg.y += 68;
ui.group_top.y += 68;
}
var anim_paly = FXManager.Instance.SetFx<SkeletonAnimation>(ui.gold.GetChild("gold_anim") as GGraph, Fx_Type.fx_coin, ref closeCallback);
anim_paly.state.SetAnimation(0, "animation", true);
if (GameHelper.GetGameday() != DateTime.Now.Day)
{
PlayerPrefs.SetInt("_time", 0);
SaveData.GetSaveObject().time_task_record = new List<int>();
GameHelper.SetGameday();
}
HallManager.Instance.UpdateSecondEvent += upData;
InitView();
ui.btn_tips.SetClick(() =>
{
ui.t0.Play();
tips_time = 0;
});
}
private int tips_time = 0;
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success);
GameDispatcher.Instance.AddListener(GameMsg.Update101, SetTopCurr);
GameDispatcher.Instance.AddListener(GameMsg.Gold_refresh, SetTopCurr);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
GameDispatcher.Instance.RemoveListener(GameMsg.Update101, SetTopCurr);
GameDispatcher.Instance.RemoveListener(GameMsg.Gold_refresh, SetTopCurr);
}
#endregion
void SetTopCurr(object a = null)
{
ui.gold.GetChild("text_gold").text = $"{DataMgr.Coin.Value:N0}";
}
private void pay_success(object a)
{
string type = (string)a;
if (type == PurchasingManager.GetPaySku(PayType.battle_pass))
{
DOVirtual.DelayedCall(0.5f, () =>
{
int gold = 0;
if(GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful");
List<Passportrewards> Passportrewards_list = ConfigSystem.GetConfig<PassportrewardsModel>().DataList;
for (int i = 0; i < Passportrewards_list.Count; i++)
{
if (GameHelper.GetBattleLv() > i || (GameHelper.GetGameExp() >= Passportrewards_list[Passportrewards_list.Count - 1].Eliminating_quantity))
{
if (Passportrewards_list[i].Paid_rewards_type == 0) gold += Passportrewards_list[i].Paid_rewards_num;
SaveData.GetSaveObject().battle_pass_paylist.Add(i + 1);
}
else break;
}
GetReward(gold,-1);
ui.pass_list.numItems = Passportrewards_list.Count;
ui.btn_recive.visible = false;
});
}
}
//初始化页面逻辑
private void InitView()
{
ui.close.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PassViewUI_Close); });
ui.gold.GetChild("text_gold").text = $"{DataMgr.Coin.Value:N0}";
passing_list = ConfigSystem.GetConfig<PassingTaskModel>().DataList;
Durationtasks_list = ConfigSystem.GetConfig<DurationtasksModel>().DataList;
Passportrewards_list = ConfigSystem.GetConfig<PassportrewardsModel>().DataList;
setPassCom();
gotoItem();
}
void upData()
{
ui.remain_time.text = CommonHelper.TimeFormat(
SaveData.GetSaveObject().battle_pass_time + Passportrewards_list[0].Passportrewards_CD * 24 * 3600 - Convert.ToInt32(GameHelper.GetNowTime()),
CountDownType.Day);
if ((SaveData.GetSaveObject().battle_pass_time + Passportrewards_list[0].Passportrewards_CD * 24 * 3600) < GameHelper.GetNowTime())
{
SaveData.GetSaveObject().battle_pass_time = (int)GameHelper.GetNowTime();
SaveData.GetSaveObject().battle_pass_freelist.Clear();
SaveData.GetSaveObject().battle_pass_paylist.Clear();
SaveData.GetSaveObject().is_get_battlepass = false;
GameHelper.ResetGameExp();
SaveData.saveDataFunc();
setPassCom();
}
tips_time++;
if (tips_time > 20)
{
ui.t0.Play();
tips_time = 0;
}
}
void setPassCom()
{
if ((SaveData.GetSaveObject().battle_pass_time + Passportrewards_list[0].Passportrewards_CD * 24 * 3600) < GameHelper.GetNowTime())
{
SaveData.GetSaveObject().battle_pass_time = (int)GameHelper.GetNowTime();
GameHelper.ResetGameExp();
SaveData.GetSaveObject().battle_pass_freelist.Clear();
SaveData.GetSaveObject().battle_pass_paylist.Clear();
SaveData.GetSaveObject().is_get_battlepass = false;
SaveData.saveDataFunc();
}
upData();
ui.pass_list.itemRenderer = battle_itemRender;
ui.pass_list.numItems = Passportrewards_list.Count;
ui.text_level.text = GameHelper.GetBattleLv().ToString();
ui.progress_pass.value = GameHelper.GetGameExp();
if (GameHelper.GetBattleLv() >= Passportrewards_list.Count)
{
ui.progress_pass.max = Passportrewards_list[GameHelper.GetBattleLv() - 1].Eliminating_quantity;
ui.progress_pass.text_num.text = GameHelper.GetGameExp().ToString();
}
else
{
ui.progress_pass.max = Passportrewards_list[GameHelper.GetBattleLv()].Eliminating_quantity;
ui.progress_pass.text_num.text = GameHelper.GetGameExp() + "/" + Passportrewards_list[GameHelper.GetBattleLv()].Eliminating_quantity;
}
ui.btn_recive.visible = !SaveData.GetSaveObject().is_get_battlepass;
ui.btn_recive.SetClick(() =>
{
// if (!GameHelper.IsGiftSwitch())UnlockPass();
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PassunlockUI_Open);
});
}
void setItemUrl(GLoader loader, int urltype)
{
if (urltype == 0) loader.url = "ui://P14_PassView/master_gold01";
else if (urltype == 4) loader.url = "ui://P14_PassView/master_gold02";
else if (urltype == 1) loader.url = "ui://Common_01/spin_remove";
else if (urltype == 2) loader.url = "ui://Common_01/spin_undo";
else if (urltype == 3) loader.url = "ui://Common_01/spin_refresh";
}
void seItemClick(com_item_award item, int number, int type, int index = 0)
{
if (type == 0)
{
GetReward(number, index);
getRewardIndex = -1;
}
else
{
GameHelper.AddItemNumber(type - 1, number);
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
}
ui.pass_list.numItems = Passportrewards_list.Count;
GameDispatcher.Instance.Dispatch(GameMsg.RefreshRedDot);
}
private void UnlockPass()
{
GameHelper.ShowVideoAd("pass_unlock", isSuccess =>
{
if (isSuccess)
{
SaveData.GetSaveObject().is_get_battlepass = true;
int gold = 0;
int out_ = 0;
int back_ = 0;
int refresh_ = 0;
for (int i = 0; i < Passportrewards_list.Count; i++)
{
if (GameHelper.GetBattleLv() > i)
{
if (Passportrewards_list[i].Paid_rewards_type == 0) gold += Passportrewards_list[i].Paid_rewards_num;
else if (Passportrewards_list[i].Paid_rewards_type == 1) out_ += Passportrewards_list[i].Paid_rewards_num;
else if (Passportrewards_list[i].Paid_rewards_type == 2) back_ += Passportrewards_list[i].Paid_rewards_num;
else if (Passportrewards_list[i].Paid_rewards_type == 3) refresh_ += Passportrewards_list[i].Paid_rewards_num;
SaveData.GetSaveObject().battle_pass_paylist.Add(i + 1);
}
else break;
}
if (gold > 0)
{
GetReward(gold);
// var start = GameHelper.GetUICenterPosition(ui.btn_recive);
// var end = GameHelper.GetUICenterPosition(ui.gold.GetChild("ani_node"));
// var rewardData = new RewardData();
// var rewardSingleData = new RewardSingleData(101, gold, RewardOrigin.AdTask);
// rewardData.AddReward(rewardSingleData);
// rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
// rewardData.AddCompleted((isScu) =>
// {
// DOVirtual.DelayedCall(0.5f, () =>
// {
// var startNum = DataMgr.Coin.Value - gold;
// DOVirtual.Float((float)startNum, (float)GameHelper.GetGoldNumber(), 1f,
// value => { ui.gold.GetChild("text_gold").text = ((int)value).ToString(); });
// });
// });
// GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
}
GameHelper.AddItemNumber(0, out_);
GameHelper.AddItemNumber(1, back_);
GameHelper.AddItemNumber(2, refresh_);
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
ui.pass_list.numItems = Passportrewards_list.Count;
ui.btn_recive.visible = false;
SaveData.saveDataFunc();
}
});
}
private void GetReward(int awardNum, int index = 0)
{
var rewardData = new RewardData();
var end = GameHelper.GetUICenterPosition(ui.gold.GetChild("gold_anim"));
var rewardSingleData = new RewardSingleData(101, awardNum, RewardOrigin.Passview, index)
{
startPosition = start_pos,
endPosition = new Vector2(end.x - 150, end.y - 136)
};
rewardData.AddReward(rewardSingleData);
if (index >= 0)
{
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.Dialog |
RewardDisplayType.ValueChange;
}
else
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
rewardData.AddCompleted(success =>
{
if (success)
{
var startNum = DataMgr.Coin.Value - awardNum;
DOVirtual.Float(startNum, GameHelper.GetGoldNumber(), 1f,
value => { ui.gold.GetChild("text_gold").text = GameHelper.Get101Str((decimal)value); });
}
});
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
}
private int getRewardIndex = -1;
void gotoItem()
{
if (getRewardIndex > 0)
{
ui.pass_list.ScrollToView(getRewardIndex - 1);
}
}
void battle_itemRender(int index, GObject obj)
{
index++;
com_pass_item item = (com_pass_item)obj;
int pass_level = GameHelper.GetBattleLv();
item.index_text.text = index.ToString();
item.free_item.type.selectedIndex = 0;
item.pay_item.type.selectedIndex = 1;
List<int> freelist = SaveData.GetSaveObject().battle_pass_freelist;
List<int> paylist = SaveData.GetSaveObject().battle_pass_paylist;
if (index > 0)
{
item.free_item.number_text.text = "x" + GameHelper.Get101Str(Passportrewards_list[index - 1].Free_rewards_num);
item.pay_item.number_text.text = "x" + GameHelper.Get101Str(Passportrewards_list[index - 1].Paid_rewards_num);
if (Passportrewards_list[index - 1].Free_rewards_type == 0)
{
setItemUrl(item.free_item.item_loader, 0);
}
else
{
setItemUrl(item.free_item.item_loader, Passportrewards_list[index - 1].Paid_rewards_type);
}
if (Passportrewards_list[index - 1].Paid_rewards_type == 0)
{
setItemUrl(item.pay_item.item_loader, 4);
}
else
{
setItemUrl(item.pay_item.item_loader, Passportrewards_list[index - 1].Paid_rewards_type);
// if (Passportrewards_list[index - 1].Paid_rewards_type >= 1 && Passportrewards_list[index - 1].Paid_rewards_type <= 3)
// {
// item.pay_item.item_loader.SetScale(0.55f, 0.55f);
// }
}
if (index <= pass_level)//等级超过了
{
if (freelist.Contains(index))//领取过
{
item.free_item.state.selectedIndex = 2;
item.free_item.ani_node.visible = false;
item.free_item.SetClick(() => { });
}
else
{
if (getRewardIndex < 0) getRewardIndex = index;
item.free_item.state.selectedIndex = 1;
item.free_item.btn_claim.SetClick(() =>
{
// fx_pass.state.SetAnimation(0, "lingqu", false);
// fx_pass.state.Complete += (a) => {
// item.free_item.ani_node.visible = false;
// };
freelist.Add(index);
SaveData.saveDataFunc();
GameHelper.ShowTips("Successfully claimed");
seItemClick(item.free_item, Passportrewards_list[index - 1].Free_rewards_num, Passportrewards_list[index - 1].Free_rewards_type, index - 1);
});
}
if (paylist.Contains(index))//领取过
{
item.pay_item.state.selectedIndex = 2;
item.pay_item.SetClick(() => { });
}
else
{
if (SaveData.GetSaveObject().is_get_battlepass)
{
if (getRewardIndex < 0) getRewardIndex = index;
item.pay_item.state.selectedIndex = 1;
item.pay_item.btn_claim.SetClick(() =>
{
// fx_pass2.state.SetAnimation(0, "lingqu", false);
// fx_pass2.state.Complete += (a) => {
// // fx_pass.state.SetAnimation(0, "lingqudaiji", true);
// item.pay_item.ani_node.visible = false;
// };
paylist.Add(index);
SaveData.saveDataFunc();
seItemClick(item.pay_item, Passportrewards_list[index - 1].Paid_rewards_num, Passportrewards_list[index - 1].Paid_rewards_type, -1);
GameHelper.ShowTips("Successfully claimed");
});
}
else
{
item.pay_item.state.selectedIndex = 4;
item.pay_item.SetClick(() =>
{
// if (!GameHelper.IsGiftSwitch()) UnlockPass();
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PassunlockUI_Open);
});
}
}
}
else
{
item.free_item.state.selectedIndex = 0;//不可领取
item.free_item.SetClick(() =>
{
GameHelper.ShowTips("Receiving level not reached");
});
item.pay_item.SetClick(() =>
{
if (SaveData.GetSaveObject().is_get_battlepass)
{
GameHelper.ShowTips("Receiving level not reached");
}
else
{
// if (!GameHelper.IsGiftSwitch()) UnlockPass();
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PassunlockUI_Open);
}
});
if (SaveData.GetSaveObject().is_get_battlepass)
{
item.pay_item.state.selectedIndex = 0;
}
else
{
item.pay_item.state.selectedIndex = 3;
}
}
}
// if (index < pass_level)//进度条
// {
//
// }
// else if (index >= pass_level)
// {
// item.is_full.selectedIndex = 2;
//
// }
// else
// {
// item.is_full.selectedIndex = 2;
//
// }
if (index == 0)
{
// item.state.selectedIndex = 3;
// index++;
}
if (index == 1)
{
item.state.selectedIndex = 0;
if (pass_level > 0)
{
item.progress_0_top.height = top_progress;
if (((float)(GameHelper.GetGameExp() - Passportrewards_list[0].Eliminating_quantity) / (Passportrewards_list[1].Eliminating_quantity - Passportrewards_list[0].Eliminating_quantity)) > 0.5)
{
item.progress_0_down.height = down_progress;
}
else
{
item.progress_0_down.height = (float)(GameHelper.GetGameExp() - Passportrewards_list[0].Eliminating_quantity) / (Passportrewards_list[1].Eliminating_quantity - Passportrewards_list[0].Eliminating_quantity) * 2 * down_progress;
}
}
else
{
item.progress_0_top.height = (float)GameHelper.GetGameExp() / Passportrewards_list[0].Eliminating_quantity * top_progress;
item.progress_0_down.height = 0;
}
}
else if (index == Passportrewards_list.Count)
{
item.state.selectedIndex = 2;
if (((float)(GameHelper.GetGameExp() - Passportrewards_list[index - 2].Eliminating_quantity) / (Passportrewards_list[index - 1].Eliminating_quantity - Passportrewards_list[index - 2].Eliminating_quantity)) > 0.5)
{
float height = (((float)(GameHelper.GetGameExp() - Passportrewards_list[index - 2].Eliminating_quantity) / (Passportrewards_list[index - 1].Eliminating_quantity - Passportrewards_list[index - 2].Eliminating_quantity)) - 0.5f) * 2 * top_progress;
if (height > top_progress)
{
height = top_progress;
}
item.progress_2_top.height = height;
}
else item.progress_2_top.height = 0;
}
else
{
item.state.selectedIndex = 1;
if (pass_level >= index)
{
item.progress_1_top.height = top_progress;
}
else
{
if (pass_level == (index - 1))
{
if (((float)(GameHelper.GetGameExp() - Passportrewards_list[index - 2].Eliminating_quantity) / (Passportrewards_list[index - 1].Eliminating_quantity - Passportrewards_list[index - 2].Eliminating_quantity)) > 0.5)
{
float height = (((float)(GameHelper.GetGameExp() - Passportrewards_list[index - 2].Eliminating_quantity) / (Passportrewards_list[index - 1].Eliminating_quantity - Passportrewards_list[index - 2].Eliminating_quantity)) - 0.5f) * 2 * top_progress;
if (height > top_progress) height = top_progress;
item.progress_1_top.height = height;
}
else item.progress_1_top.height = 0;
}
else
{
item.progress_1_top.height = 0;
}
}
if (pass_level == index)
{
if (((float)(GameHelper.GetGameExp() - Passportrewards_list[index - 1].Eliminating_quantity) / (Passportrewards_list[index].Eliminating_quantity - Passportrewards_list[index - 1].Eliminating_quantity)) <= 0.5)
{
float height = (float)(GameHelper.GetGameExp() - Passportrewards_list[index - 1].Eliminating_quantity) / (Passportrewards_list[index].Eliminating_quantity - Passportrewards_list[index - 1].Eliminating_quantity) * 2 * down_progress;
if (height > down_progress)
{
height = down_progress;
}
item.progress_1_down.height = height;
}
else
{
item.progress_1_down.height = down_progress;
}
}
else
{
if (pass_level > index)
{
item.progress_1_down.height = down_progress;
}
else item.progress_1_down.height = 0;
}
}
}
private int top_progress=105;
private int down_progress=116;
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: f79cd1d7488b02947927c590ff0ca064
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,71 +0,0 @@
namespace ChillConnect
{
public class PassViewUICtrl : BaseUICtrl
{
private PassViewUI ui;
private PassViewModel model;
private uint openUIMsg = UICtrlMsg.PassViewUI_Open;
private uint closeUIMsg = UICtrlMsg.PassViewUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.PassViewModel) as PassViewModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new PassViewUI(this);
ui.Open(args);
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 36d6b1dc50ab3b0478e972821c6f0ce5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ecc078bc5f221214cb8f46e580b74fa8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,42 +0,0 @@
namespace ChillConnect
{
public class PassunlockCtrl : BaseCtrl
{
public static PassunlockCtrl Instance { get; private set; }
private PassunlockModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.PassunlockModel) as PassunlockModel;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2b53fa48e580b4882a9c0441fac55e15
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,26 +0,0 @@
namespace ChillConnect
{
public class PassunlockModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: eb4bc378cc43143cdaa3c2fa20c27548
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,155 +0,0 @@
using System;
using System.Collections.Generic;
using FairyGUI;
using FGUI.Common_01;
using FGUI.P14_PassView;
using IgnoreOPS;
using SGModule.Net;
using SGModule.NetKit;
namespace ChillConnect
{
public class PassunlockUI : BaseUI
{
private PassunlockUICtrl ctrl;
private PassunlockModel model;
private com_passunlock ui;
public btn_watchAd btn_WatchAd;
public PassunlockUI(PassunlockUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.PassunlockUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "P14_PassView";
uiInfo.assetName = "com_passunlock";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.PassunlockModel) as PassunlockModel;
}
protected override void OnClose()
{
AdRedeemManager.Instance.Destroy();
GameHelper.CallShowTurn();
}
protected override void OnBind()
{
ui = baseUI as com_passunlock;
}
protected override void OnOpenBefore(object args)
{
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
(ui.btn_max_pay.GetChild("img_saveingpot") as GImage).visible = true;
ui.btn_buypass.GetChild("img_saveingpot").visible = true;
}
if (!GameHelper.IsGiftSwitch())
{
GameHelper.GetCommonModel().Passportgift = 1;
}
if (GameHelper.IsAdModelOfPay())
{
ui.pay_type.selectedIndex = 0;
btn_watchAd btn = ui.btn_buypass as btn_watchAd;
btn.buy_type.selectedIndex = 0;
AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.battle_pass), ui.btn_buypass as btn_watchAd, SetTextString);
AdRedeemManager.Instance.Start();
SetTextString();
}
else
{
ui.pay_type.selectedIndex = 1;
decimal price = (decimal)GameHelper.GetCommonModel().Passportgift2;
ui.btn_max_pay.title = GameHelper.getPrice(price);
ui.btn_max_pay.SetClick(() =>
{
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price * 100),
sku = PurchasingManager.GetPaySku(PayType.battle_pass),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
InitView();
TrackKit.SendEvent(GameHelper.getTrackEvenName(), Property.PassShow);
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
}
#endregion
void pay_success(object str)
{
string type = (string)str;
if (type == PurchasingManager.GetPaySku(PayType.battle_pass))
{
CtrlCloseUI();
}
}
//初始化页面逻辑
private void InitView()
{
ui.btn_close.SetClick(CtrlCloseUI);
int gold = 0;
List<Passportrewards> Passportrewards_list = ConfigSystem.GetConfig<PassportrewardsModel>().DataList;
for (int i = 0; i < Passportrewards_list.Count; i++)
{
if (Passportrewards_list[i].Paid_rewards_type == 0) gold += Passportrewards_list[i].Paid_rewards_num;
}
ui.text_allgold.text = GameHelper.Get101Str(gold);
}
public void SetTextString()
{
var need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.battle_pass));
var myAd = AdRedeemManager.Instance.GetLookRewardADNum();
ui.tips.SetVar("num", need.ToString()).FlushVars();
ui.ads.SetVar("num", myAd.ToString()).FlushVars();
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6923c290d351644508b81cee1a88e1d8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,71 +0,0 @@
namespace ChillConnect
{
public class PassunlockUICtrl : BaseUICtrl
{
private PassunlockUI ui;
private PassunlockModel model;
private uint openUIMsg = UICtrlMsg.PassunlockUI_Open;
private uint closeUIMsg = UICtrlMsg.PassunlockUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.PassunlockModel) as PassunlockModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new PassunlockUI(this);
ui.Open(args);
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9730d87819cc94ea5b1f8a5871d19ccc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -158,24 +158,24 @@ namespace ChillConnect
{
ui.btn_us.visible = true;
}
ui.btn_restore.SetClick(() =>
{
ApplePayManager.Instance.AppleRestore((success, message) =>
{
if (success)
{
GameHelper.ShowTips("Restore Purchases Success!");
// SaveData.GetSaveObject().is_get_packreward = success;
SaveData.GetSaveObject().have_slot = success;
GameDispatcher.Instance.Dispatch(GameMsg.noads_refresh);
}
else
{
// Debug.Log("[barry] restore failed: " + success);
GameHelper.ShowTips("There are no recoverable transactions");
}
});
});
// ui.btn_restore.SetClick(() =>
// {
// ApplePayManager.Instance.AppleRestore((success, message) =>
// {
// if (success)
// {
// GameHelper.ShowTips("Restore Purchases Success!");
// // SaveData.GetSaveObject().is_get_packreward = success;
// SaveData.GetSaveObject().have_slot = success;
// GameDispatcher.Instance.Dispatch(GameMsg.noads_refresh);
// }
// else
// {
// // Debug.Log("[barry] restore failed: " + success);
// GameHelper.ShowTips("There are no recoverable transactions");
// }
// });
// });
}
private void SetSlideValue()
@@ -279,7 +279,7 @@ namespace ChillConnect
if (string.IsNullOrEmpty(name) || name.IsNullOrWhiteSpace())
{
GameHelper.ShowTips("The input cannot be null", true);
GameHelper.ShowTips("empty_input", true);
return;
}
@@ -180,27 +180,27 @@ namespace ChillConnect
var account = ui.com_account.com_email.enter_email.text.Replace(" ", "");
if (account == "")
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
if (!GameHelper.CheckAccountValidly(account))
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
var fname = ui.com_account.com_first_name.enter_first_name.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(fname))
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
var lname = ui.com_account.com_last_name.enter_last_name.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(lname) && !AppConst.isPt())
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
@@ -241,7 +241,7 @@ namespace ChillConnect
}
else
{
GameHelper.ShowTips("Failed to save information., please try again");
GameHelper.ShowTips("failed_save", true);
ui.com_second_confirm.btn_confirm.enabled = true;
}
});
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 128a3662af2c80e44a1b5e99655f27e6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,19 +0,0 @@
namespace ChillConnect
{
public class ResurgenceCtrl : BaseCtrl
{
public static ResurgenceCtrl Instance { get; private set; }
private ResurgenceModel model;
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4d56a2d552aac4144bd57d8ba295b6fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,13 +0,0 @@
namespace ChillConnect
{
public class ResurgenceModel : BaseModel
{
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 0a39a114043b6494f946e195cd413673
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,305 +0,0 @@
using System;
using System.Collections.Generic;
using FairyGUI;
using FGUI.Common_01;
using FGUI.failpack;
using IgnoreOPS;
using SGModule.Net;
using SGModule.NetKit;
using UnityEngine;
namespace ChillConnect
{
public class ResurgenceUI : BaseUI
{
private ResurgenceUICtrl ctrl;
private ResurgenceModel model;
private com_resurgence ui;
public ResurgenceUI(ResurgenceUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ResurgenceUI;
this.ctrl = ctrl;
}
private float progress_value;
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "failpack";
uiInfo.assetName = "com_resurgence";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
}
protected override void OnClose()
{
GameHelper.CallShowTurn();
}
protected override void OnBind()
{
ui = baseUI as com_resurgence;
}
protected override void OnOpenBefore(object args)
{
Debug.Log(args);
progress_value = (float)args * 100;
InitView();
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.fail_show, 1);
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.FailGiftShow);
InitBroadCast();
if (GameHelper.IsGiftSwitch())
{
ui.broad.visible = true;
}
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
if (GameHelper.IsAdModelOfPay())
{
HallManager.Instance.UpdateSecondEvent += InitView;
}
GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success);
HallManager.Instance.UpdateSecondEvent += updatEevent;
}
protected override void RemoveListener()
{
if (GameHelper.IsAdModelOfPay())
{
HallManager.Instance.UpdateSecondEvent -= InitView;
}
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
HallManager.Instance.UpdateSecondEvent -= updatEevent;
}
#endregion
private void updatEevent()
{
// ui.text_remain.text=CommonHelper.TimeFormat((int)(SaveData.GetSaveObject().failed_pack_time - Convert.ToInt32(GameHelper.GetNowTime())), CountDownType.Hour);
broadtime++;
BroadCast();
}
void pay_success(object str)
{
string type = (string)str;
Debug.Log("77777777777777777777777777" + type);
if (type == PurchasingManager.GetPaySku(PayType.fail_pack))
{
var start = GameHelper.GetUICenterPosition(ui.bg);
//var end = GameHelper.GetUICenterPosition(ui.gold.GetChild("text_gold"));
// reward_data temp = new reward_data() { start = start, end = end, change = list[1].coins_quantity, type = 101 };
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.CoinWnd_newUI_Open, temp);
// DOVirtual.DelayedCall(1, () =>
// {
// DOVirtual.Float(0, (float)DataMgr.Coin.Value, 1,
// value => { ui.gold.GetChild("text_gold").text = GameHelper.Get101Str((decimal)value); });
// });
var rewardData = new RewardData();
var end = GameHelper.GetUICenterPosition(ui.end_point);
var rewardSingleData = new RewardSingleData(101, list[2].coins_quantity, RewardOrigin.AdTask)
{
startPosition = start,
endPosition = new Vector2(end.x - 110, end.y - 110)
};
rewardData.AddReward(rewardSingleData);
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
rewardData.AddCompleted(success =>
{
// if (success)
// {
// RefreshGold(awardNum);
// }
});
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
// DataMgr.Coin.Value -= list[1].coins_quantity;
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Close);
}
}
private List<Paidgift> list;
//初始化页面逻辑
private void InitView()
{
if (SaveData.GetSaveObject().failed_pack_time < GameHelper.GetNowTime())
{
SaveData.GetSaveObject().failed_pack_time = (int)GameHelper.GetNowTime() + GameHelper.GetCommonModel().FailedGiftCD;
}
ui.btn_back.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Close);
GameDispatcher.Instance.Dispatch(GameMsg.resurgence_close);
});
list = ConfigSystem.GetConfig<PaidgiftModel>().DataList;
int gold_num = list[2].coins_quantity;
int back_num = list[2].props_quantity[1];
int out_num = list[2].props_quantity[0];
int refresh_num = list[2].props_quantity[2];
ui.text_outnum.text = "x" + out_num;
ui.text_backnum.text = "x" + back_num;
ui.text_refreshnum.text = "x" + refresh_num;
ui.text_goldnum.text = "x" + gold_num;
ui.text_progress.text = "Completion:" + Math.Round(progress_value) + "%";
ui.progress_1.value = progress_value;
if (!GameHelper.IsAdModelOfPay())
{
ui.pay_type.selectedIndex = 1;
decimal price = (decimal)list[2].Paid_price2;
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.SetClick(() =>
{
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price * 100),
sku = PurchasingManager.GetPaySku(PayType.fail_pack),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
return;
}
int myAdNum = AdRedeemManager.Instance.GetLookRewardADNum();
ui.text_have.text = "Owner ADs:" + myAdNum;
ui.need_text.text = "need " + list[2].Paid_price + " ADs";
btn_watchAd btn_buy = ui.btn_buy as btn_watchAd;
btn_buy.img_saveingpot.visible = false;
// btn_buy.SetClick(() =>
// {
// GameDispatcher.Instance.Dispatch(GameMsg.resurgence);
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Close);
// });
if (myAdNum >= list[2].Paid_price)
{
btn_buy.buy_state.selectedIndex = 1;
btn_buy.can_buy.selectedIndex = 0;
btn_buy.SetClick(() =>
{
ApplePayClass test = new ApplePayClass
{
sku = PurchasingManager.GetPaySku(PayType.fail_pack),
};
AdRedeemManager.Instance.SetLookRewardADNum(myAdNum - (int)list[2].Paid_price);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.fail_buy_success, 1);
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.FailGiftSuccess);
GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, PurchasingManager.GetPaySku(PayType.fail_pack));
});
}
else if (SaveData.GetSaveObject()._watch_ad_cd > GameHelper.GetNowTime())
{
btn_buy.buy_state.selectedIndex = 0;
btn_buy.can_buy.selectedIndex = 1;
btn_buy.btn_text.text = CommonHelper.TimeFormat(SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
btn_buy.SetClick(() =>
{
});
}
else
{
btn_buy.buy_state.selectedIndex = 0;
btn_buy.can_buy.selectedIndex = 0;
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) btn_buy.img_saveingpot.visible = true;
btn_buy.SetClick(() =>
{
GameHelper.ShowVideoAd("Pass", issuccess =>
{
if (issuccess)
{
SaveData.GetSaveObject()._watch_ad_cd = (int)GameHelper.GetNowTime() + GameHelper.GetCommonModel().exchangeCD;
InitView();
}
});
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.fail_click, 1);
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.FailGiftClick);
});
}
}
private int broadtime = 1;
private List<string> config_name_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_name_list;
private List<string> config_money_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_money_list;
private List<string[]> broad_list = new List<string[]>();
private void BroadCast()
{
if (broadtime % 3 == 0)
{
(ui.broad as com_broadcast_new).t1.Play(() =>
{
broad_list.RemoveAt(0);
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
for (int i = 0; i < 4; i++)
{
text_list[i].text = "Congratulations,User [color=#ad4800][size=36]" + broad_list[i][0] + "[/size][/color] !After purchasing the Failure Gift Package,play [color=#ad4800]" + broad_list[i][1] + "[/color] matcher to clear the level!";
}
});
}
}
private List<GTextField> text_list = new List<GTextField>();
private void InitBroadCast()
{
Debug.Log(text_list);
Debug.Log(ui.broad);
Debug.Log((ui.broad as com_broadcast_new));
text_list.Add((ui.broad as com_broadcast_new).text_0);
text_list.Add((ui.broad as com_broadcast_new).text_1);
text_list.Add((ui.broad as com_broadcast_new).text_2);
text_list.Add((ui.broad as com_broadcast_new).text_3);
for (int i = 0; i < 4; i++)
{
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
text_list[i].text = "Congratulations,User [color=#ad4800][size=36]" + broad_list[i][0] + "[/size][/color] !After purchasing the Failure Gift Package,play [color=#ad4800]" + broad_list[i][1] + "[/color] matcher to clear the level!";
}
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: fb8f89f92a98b4317be64d4c14d8f602
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,72 +0,0 @@
namespace ChillConnect
{
public class ResurgenceUICtrl : BaseUICtrl
{
private ResurgenceUI ui;
private ResurgenceModel model;
private uint openUIMsg = UICtrlMsg.ResurgenceUI_Open;
private uint closeUIMsg = UICtrlMsg.ResurgenceUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.ResurgenceModel) as ResurgenceModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ResurgenceUI(this);
ui.Open(args);
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ad517c5a5d56648249afb6f3adb0582d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -176,7 +176,7 @@ namespace ChillConnect
ske_pot.SetActive(true);
if (SaveData.GetSaveObject().saveingpot_ch < makeupTaskData.amount)
{
((btn_watchAd)ui.btn_ch).watch.text = "Go";
((btn_watchAd)ui.btn_ch).watch.text = Language.GetContentParams("go");
((btn_watchAd)ui.btn_ch).buy_state.selectedIndex = 0;
ui.btn_ch.SetClick(() => { });
@@ -203,7 +203,7 @@ namespace ChillConnect
btn_watchAd btnWatchad = ui.btn_ch as btn_watchAd;
btnWatchad.enabled = true;
btnWatchad.buy_state.selectedIndex = 1;
btnWatchad.title = "GET GIFT CARD";
btnWatchad.title = Language.GetContentParams("get_card");
btnWatchad.SetClick(() => { });
btnWatchad.SetClick(() =>
{
@@ -377,7 +377,7 @@ namespace ChillConnect
{
ui.cont_confirm.selectedIndex = 0;
ui.type.selectedIndex = 6;
ui.text_payhint.text = "You will get the " + makeupTaskData.amountStr + " for 90 days";
ui.text_payhint.text = Language.GetContentParams("saveingpot_get", makeupTaskData.amountStr);
ui.text_query.text = DataMgr.ExchangeAccount.Value;
ui.btn_confirm.SetClick(() =>
{
@@ -554,12 +554,12 @@ namespace ChillConnect
if (makeupTaskData.rdData[index].isClaimed)
{
item.btn_claim.state.selectedIndex = 1;
item.btn_claim.title = "Claimed";
item.btn_claim.title = Language.GetContentParams("claimed");
}
else
{
item.btn_claim.state.selectedIndex = 0;
item.btn_claim.title = "Claim";
item.btn_claim.title = Language.GetContentParams("claim");
}
item.btn_claim.SetClick(() =>
@@ -734,8 +734,8 @@ namespace ChillConnect
return;
}
ui.type.selectedIndex = 4;
ui.com_task.text_task.text = "get gift card";
ui.com_task.text_payer.text = "{amt=$0.5} directly to your gift card";
ui.com_task.text_task.text = Language.GetContentParams("get_card");
ui.com_task.text_payer.text = Language.GetContentParams("saveingpot_claimed","amt=$0.5");
ui.com_task.text_orderid.text = makeupTaskData.orderID;
ui.com_task.text_task_title.SetVar("ad", vo.ad_need.ToString()).FlushVars();
ui.com_task.text_ads.text = $"{makeupTaskData.videoCount}/{vo.ad_need}";
@@ -836,27 +836,31 @@ namespace ChillConnect
var account = enter_input.text.Replace(" ", "");
if (account == null || account == "")
{
GameHelper.ShowTips("Please enter the correct account information1", true);
string content = Language.GetContentParams("empty_account1", 1);
GameHelper.ShowTips(content);
return;
}
if (!GameHelper.CheckAccountValidly(account))
{
GameHelper.ShowTips("Please enter the correct account information2", true);
string content = Language.GetContentParams("empty_account1", 2);
GameHelper.ShowTips(content);
return;
}
var fname = ui.com_fname.enter_fname.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(fname))
{
GameHelper.ShowTips("Please enter the correct account information3", true);
string content = Language.GetContentParams("empty_account1", 3);
GameHelper.ShowTips(content);
return;
}
var lname = ui.com_lname.enter_lname.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(lname) && !AppConst.isPt())
{
GameHelper.ShowTips("Please enter the correct account information4", true);
string content = Language.GetContentParams("empty_account1", 4);
GameHelper.ShowTips(content);
return;
}
DataMgr.ExchangeAccount.Value= account;
@@ -947,7 +951,7 @@ namespace ChillConnect
btn_list[i].img_outline.visible = false;
btn_list[i].SetClick(() =>
{
GameHelper.ShowTips("To be unlocked");
GameHelper.ShowTips("un_lock",true);
});
}
else
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 3745272d3c4e2410dad0d896f5a2de89
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,42 +0,0 @@
namespace ChillConnect
{
public class BuygoldCtrl : BaseCtrl
{
public static BuygoldCtrl Instance { get; private set; }
private BuygoldModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.BuygoldModel) as BuygoldModel;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2342594a3679d4cc3871150e477d7ffb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,26 +0,0 @@
namespace ChillConnect
{
public class BuygoldModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 14fccb4c1b1fb4e7188a1c7a070629dc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,436 +0,0 @@
using System;
using System.Collections.Generic;
using DG.Tweening;
using FairyGUI;
using FGUI.store_17;
using IgnoreOPS;
using Newtonsoft.Json;
using SGModule.Net;
using SGModule.NetKit;
using Spine.Unity;
using UnityEngine;
namespace ChillConnect
{
public class BuygoldUI : BaseUI
{
private BuygoldUICtrl ctrl;
private BuygoldModel model;
private com_buygold ui;
private Action closeCallback;
private bool isAutoPop;
public BuygoldUI(BuygoldUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.BuygoldUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "store_17";
uiInfo.assetName = "com_buygold";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.BuygoldModel) as BuygoldModel;
}
protected override void OnClose()
{
AdRedeemManager.Instance.Destroy();
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= initList;
HallManager.Instance.UpdateSecondEvent -= upWatchAdsBtn;
// HallManager.Instance.UpdateSecondEvent -= removeAdCountDown;
GameDispatcher.Instance.Dispatch(GameMsg.pack_close);
//int three_gift_got_index = SaveData.GetSaveObject().three_gift_got_index;
// if (isAutoPop && (three_gift_got_index <= (int) rewardState.day3)) {
// uiCtrlDispatcher.Dispatch(UICtrlMsg.ThreeDaysGiftUI_Open);
// }
if (Isbuysuccess)
{
GameHelper.ShowTurnOffReward();
}
else
{
// GameHelper.ShowPaidPack();
}
}
private bool Isbuysuccess = false;
protected override void OnBind()
{
ui = baseUI as com_buygold;
}
protected override void OnOpenBefore(object args)
{
if (args != null)
{
isAutoPop = (bool)args;
}
// test
// SaveData.GetSaveObject().remove_ad_time = Convert.ToInt32(GameHelper.GetNowTime()) + 5;
// SaveData.GetSaveObject().is_get_removead = true;
if (SaveData.GetSaveObject().gold_shop_time == null || SaveData.GetSaveObject().gold_shop_time.Count < list.Count)
{
SaveData.GetSaveObject().gold_shop_time = new List<int>();
for (int i = 0; i < list.Count; i++)
{
SaveData.GetSaveObject().gold_shop_time.Add(0);
}
}
if (Screen.safeArea.y != 0)
{//刘海屏
// ui.shop_panel_parent.y += 68;
ui.top_gold.y += 68;
}
var anim_paly = FXManager.Instance.SetFx<SkeletonAnimation>(ui.top_gold.GetChild("gold_anim") as GGraph, Fx_Type.fx_coin, ref closeCallback);
anim_paly.state.SetAnimation(0, "animation", true);
PaidgiftList = ConfigSystem.GetConfig<PaidgiftModel>().DataList;
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.gold_show, 1);
TrackKit.SendEvent(GameHelper.getTrackEvenName(), Property.GoldShow);
ui.top_gold.GetChild("text_gold").text = GameHelper.Get101Str(GameHelper.GetGoldNumber());
// ui.shop_panel_parent.shopPanel.pay_type.selectedIndex = !GameHelper.IsAdModelOfPay() ? 1 : 0;
if (GameHelper.IsAdModelOfPay())
{
ui.state.selectedIndex = 0;
}
else
{
ui.state.selectedIndex = 1;
}
InitView();
HallManager.Instance.UpdateSecondEvent += initList;
HallManager.Instance.UpdateSecondEvent += upWatchAdsBtn;
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
}
#endregion
public void upWatchAdsBtn()
{
int lastTimes = SaveData.GetSaveObject()._watch_ad_cd;
int time = Convert.ToInt32(GameHelper.GetNowTime());
btn_watchAd2 btn_watch = ui.btn_watch;
if (time < lastTimes)
{
btn_watch.enabled = false;
btn_watch.can_buy.selectedIndex = 1;
btn_watch.btn_text.text = CommonHelper.TimeFormat(lastTimes - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
else
{
ui.btn_watch.enabled = true;
btn_watch.can_buy.selectedIndex = 0;
btn_watch.watch.text = "Watch AD";
}
}
void GetAward(decimal gold, int index)
{
var item = ui.gold_list.GetChildAt(index);
var start = GameHelper.GetUICenterPosition(item);
var end = GameHelper.GetUICenterPosition(ui.top_gold.GetChild("gold_anim"));
var rewardData = new RewardData();
var rewardSingleData = new RewardSingleData(101, gold, RewardOrigin.AdTask)
{
startPosition = start,
endPosition = new Vector2(end.x - 130, end.y - 130)
};
rewardData.AddReward(rewardSingleData);
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
rewardData.AddCompleted(isScu =>
{
DOVirtual.DelayedCall(0.5f, () =>
{
var startNum = DataMgr.Coin.Value - gold;
DOVirtual.Float((float)startNum, GameHelper.GetGoldNumber(), 1f,
value => { ui.top_gold.GetChild("text_gold").text = GameHelper.Get101Str((decimal)value); });
});
});
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
}
void pay_success(object str)
{
string type = (string)str;
string purch_number = "";
Debug.Log("pay_success------" + type);
if (type.StartsWith("buy_gold"))
{
int startIndex = "buy_gold".Length;
string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符
int suffix_num = int.Parse(suffix);
SaveData.GetSaveObject()._goldtime[suffix_num] = (int)GameHelper.GetNowTime();
SaveData.saveDataFunc();
GetAward(list[suffix_num].Actual_coins, suffix_num);
purch_number = list[suffix_num].Payment_amount.ToString();
Isbuysuccess = true;
}
if (purch_number != "")
{
GameHelper.SendRevenueToAF(purch_number);
}
SetTextString();
}
//初始化页面逻辑
private List<Paidgift> PaidgiftList;
private int gold_num = 300;
private int back_num = 1;
private int out_num = 1;
private int refresh_num = 1;
private void InitView()
{
ui.top_gold.touchable = false;
ui.btn_close.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Close); });
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
ui.btn_watch.img_saveingpot.visible = true;
}
initList();
upWatchAdsBtn();
ui.btn_watch.SetClick(() =>
{
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_AD_event, BuriedPointEvent.gold_click_ad,1);
TrackKit.SendEvent(GameHelper.getTrackEvenName(), Property.GoldClickAd);
GameHelper.ShowVideoAd("BuyGold", issuccess =>
{
if (issuccess)
{
var ad_times = Convert.ToInt32(GameHelper.GetNowTime());
SaveData.GetSaveObject()._watch_ad_cd = ad_times + GameHelper.GetCommonModel().exchangeCD;
DOVirtual.DelayedCall(0.01f, () =>
{
initList();
upWatchAdsBtn();
});
}
});
});
}
private List<Paidcoins> list = ConfigSystem.GetConfig<PaidcoinsModel>().DataList;
void initList()
{
if (!GameHelper.IsGiftSwitch())
{
ConfigSystem.GetConfig<PaidcoinsModel>().DataList = ConfigSystem.GetConfig<PaidcoinsModel>().DataList.GetRange(0, 2);
ConfigSystem.GetConfig<PaidcoinsModel>().DataList[1].Payment_amount = 1;
list=ConfigSystem.GetConfig<PaidcoinsModel>().DataList;
}
ui.gold_list.itemRenderer = setRemaintime;
ui.gold_list.numItems = list.Count > 6 ? 6 : list.Count;
SetTextString();
}
public void SetTextString()
{
var myAds = AdRedeemManager.Instance.GetLookRewardADNum();
ui.ads.SetVar("num", myAds.ToString()).FlushVars();
// var remove_need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.remove_ad));
// var pack_need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.pack_reward));
//
// ui.shop_panel_parent.shopPanel.btn_pack_get.title = pack_need + " ADs";
// ui.shop_panel_parent.shopPanel.btn_remove_get.title = remove_need + " ADs";
}
void setRemaintime(int index, GObject obj)
{
buygold_item item = (buygold_item)obj;
var myAds = AdRedeemManager.Instance.GetLookRewardADNum();
int time = 0;
time = SaveData.GetSaveObject()._goldtime[index];
item.coin_text.text = GameHelper.Get101Str(list[index].Actual_coins);
bool is_paid = list[index].is_paid;
item.index.selectedIndex = is_paid ? 1 : 0;
item.off_text.text = list[index].Discount_rate + "%";
item.discount.visible = !GameHelper.IsAdModelOfPay() && list[index].Discount_rate > 0;
double gold_price1 = list[index].Payment_amount;
int needAds = (int)Math.Ceiling(gold_price1);
if (list[index].Discount_rate != 0) item.off_text.text = list[index].Discount_rate + "%";
if (time + list[index].receive_CD < GameHelper.GetNowTime())
{
if (!is_paid)
{
item.btn_buy.btn_text.text = "Free";
item.discount.visible = false;
item.btn_buy.can_buy.selectedIndex = 0;
}
else
{
if (!GameHelper.IsAdModelOfPay())
{
item.btn_buy.can_buy.selectedIndex = 0;
decimal price = (decimal)list[index].Payment_amount2;
item.btn_buy.btn_text.text = GameHelper.getPrice(price);
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
item.btn_buy.img_saveingpot.visible = true;
}
}
else
{
if (myAds >= needAds)
{
item.btn_buy.can_buy.selectedIndex = 0;
// item.btn_buy.btn_text.text = needAds + "ADs";
item.btn_buy.btn_text.text = "Claim";
}
else
{
item.btn_buy.can_buy.selectedIndex = 1;
item.btn_buy.btn_text.text = "Watch " + myAds + "/" + needAds + " AD";
// item.btn_buy.btn_text.text = + "ADs";
}
item.text_ads.SetVar("ads", needAds.ToString()).FlushVars();
}
item.text_ads.visible = GameHelper.IsAdModelOfPay();
}
item.btn_buy.SetClick(() =>
{
if (!is_paid)
{
SaveData.GetSaveObject()._goldtime[index] = (int)GameHelper.GetNowTime();
GetAward(list[index].Actual_coins, index);
InitView();
}
else
{
// AdRedeemManager.Instance.SetLookRewardADNum(AdRedeemManager.Instance.GetLookRewardADNum() - needAds);
SaveData.saveDataFunc();
redeem_Gold(index);
}
});
}
else
{
item.btn_buy.can_buy.selectedIndex = 1;
if (!GameHelper.IsAdModelOfPay())
{
}
else
{
// double gold_price1 = list[index].Payment_amount;
// int needAds = (int)Math.Ceiling(gold_price1);
}
item.btn_buy.btn_text.text = CommonHelper.TimeFormat(time + list[index].receive_CD - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
item.btn_buy.SetClick(() =>
{
});
item.text_ads.visible = GameHelper.IsAdModelOfPay();
}
}
public string getShopName(int index)
{
string name;
name = list[index].SKU;
return name;
}
private void redeem_Gold(int index)
{
// string _type = "buy_gold" + index.ToString();
string _type = getShopName(index);
if (GameHelper.IsAdModelOfPay())
{
AdRedeemData test = new AdRedeemData
{
ad_count = AdRedeemManager.Instance.GetCeilingNeedAds($"buy_gold{index}"),
type = $"buy_gold{index}",
shopName = $"buy_gold{index}"
};
AdRedeemManager.Instance.Redeem(test);
}
else
{
decimal price = (decimal)list[index].Payment_amount2;
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price * 100),
sku = _type,
currency = "USD",
shopName = $"buy_gold{index}"
};
MaxPayManager.Instance.Buy(maxPayData);
}
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 7de4ee29003a34adbb4ff4e0c97ed52c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,82 +0,0 @@
using System;
namespace ChillConnect
{
public class BuygoldUICtrl : BaseUICtrl
{
private BuygoldUI ui;
private BuygoldModel model;
private uint openUIMsg = UICtrlMsg.BuygoldUI_Open;
private uint closeUIMsg = UICtrlMsg.BuygoldUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.BuygoldModel) as BuygoldModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new BuygoldUI(this);
ui.Open(args);
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
HallManager.Instance.UpdateSecondEvent += removeAdCountDown;
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
public void removeAdCountDown()
{
int cd = SaveData.GetSaveObject().remove_ad_time - Convert.ToInt32(GameHelper.GetNowTime());
if (cd <= 0)
{
SaveData.GetSaveObject().is_get_removead = false;
SaveData.GetSaveObject().remove_ad_time = 0;
}
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: bfad94d0fa70d40bd8308f8fb11b9520
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -57,7 +57,7 @@ public static class Language
lang = "ru";
}
// }
lang = "ja";
// lang = "pt";
setCurrentLanguage(lang);
}