fix:1、漏提交多语言xml文件 2、删除了部分不用代码

This commit is contained in:
2026-07-07 14:18:15 +08:00
parent e3b0b9b008
commit 09c02d51f7
81 changed files with 1278 additions and 4145 deletions
+1 -6
View File
@@ -67,12 +67,7 @@ public class ChillConnectRoot : MonoBehaviour
DataMgr.SignState.Value.Add(GameHelper.GetNowTime() + (long)TimeSpan.FromDays(DataMgr.SignState.Value.Count).TotalSeconds);
DataMgr.SignState.Save();
}));
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
() => "打开礼包界面",
s =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, true);
}));
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
() => "类型测试+10",
s =>
-16
View File
@@ -14,20 +14,12 @@ namespace ChillConnect
public const string PrivacyCtrl = "PrivacyCtrl";
public const string PreferencesDataReadyCtrl = "PreferencesDataReadyCtrl";
public const string GameResultCtrl = "GameResultCtrl";
public const string RainPlayCtrl = "RainPlayCtrl";
public const string BuyPropCtrl = "BuyPropCtrl";
public const string ChoosePropCtrl = "ChoosePropCtrl";
public const string AddViewCtrl = "AddViewCtrl";
public const string OpenGameCtrl = "OpenGameCtrl";
public const string RewardboxCtrl = "RewardboxCtrl";
public const string PayloadingCtrl = "PayloadingCtrl";
public const string HallCtrl = "HallCtrl";
public const string H5Ctrl = "H5Ctrl";
public const string WheelViewCtrl = "WheelViewCtrl";
public const string BuygoldCtrl = "BuygoldCtrl";
public const string BuyConfirmCtrl = "BuyConfirmCtrl";
public const string GameMenuCtrl = "GameMenuCtrl";
public const string EggViewCtrl = "EggViewCtrl";
public const string PersonViewCtrl = "PersonViewCtrl";
public const string TipsViewCtrl = "TipsViewCtrl";
public const string LevelRewardCtrl = "LevelRewardCtrl";
@@ -35,22 +27,14 @@ namespace ChillConnect
public const string MakeupConfirmCtrl = "MakeupConfirmCtrl";
public const string SaveingPotCtrl = "SaveingPotCtrl";
public const string ResurgenceCtrl = "ResurgenceCtrl";
public const string RewardMulNewCtrl = "RewardMulNewCtrl";
public const string FirstRewardCtrl = "FirstRewardCtrl";
public const string ThreeDaysGiftCtrl = "ThreeDaysGiftCtrl";
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";
public const string FAQCtrl = "FAQCtrl";
public const string AddViewoffCtrl = "AddViewoffCtrl";
public const string RankCtrl = "RankCtrl";
public const string RankRewardCtrl = "RankRewardCtrl";
public const string RankRuleCtrl = "RankRuleCtrl";
public const string PackrewardCtrl = "PackrewardCtrl";
public const string GoldRewardCtrl = "GoldRewardCtrl";
public const string AddviewnewCtrl = "AddviewnewCtrl";
public const string NewTaskCtrl = "NewTaskCtrl";
public const string GetTaskRewardCtrl = "GetTaskRewardCtrl";
public const string PettyAwardCtrl = "PettyAwardCtrl";
@@ -12,21 +12,13 @@ namespace ChillConnect
public const string OpenBgModel = "OpenBgModel";
public const string NetLoadingModel = "NetLoadingModel";
public const string MenuModel = "MenuModel";
public const string RainPlayModel = "RainPlayModel";
public const string RewardModel = "RewardModel";
public const string ChoosePropModel = "ChoosePropModel";
public const string BuyPropModel = "BuyPropModel";
public const string GameResultModel = "GameResultModel";
public const string AddViewModel = "AddViewModel";
public const string OpenGameModel = "OpenGameModel";
public const string RewardboxModel = "RewardboxModel";
public const string PayloadingModel = "PayloadingModel";
public const string HallModel = "HallModel";
public const string WheelViewModel = "WheelViewModel";
public const string BuygoldModel = "BuygoldModel";
public const string BuyConfirmModel = "BuyConfirmModel";
public const string GameMenuModel = "GameMenuModel";
public const string EggViewModel = "EggViewModel";
public const string PersonViewModel = "PersonViewModel";
public const string TipsViewModel = "TipsViewModel";
public const string LevelRewardModel = "LevelRewardModel";
@@ -34,22 +26,14 @@ namespace ChillConnect
public const string MakeupConfirmModel = "MakeupConfirmModel";
public const string SaveingPotModel = "SaveingPotModel";
public const string ResurgenceModel = "ResurgenceModel";
public const string RewardMulNewModel = "RewardMulNewModel";
public const string FirstRewardModel = "FirstRewardModel";
public const string ThreeDaysGiftModel = "ThreeDaysGiftModel";
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";
public const string FAQModel = "FAQModel";
public const string AddViewoffModel = "AddViewoffModel";
public const string RankModel = "RankModel";
public const string RankRewardModel = "RankRewardModel";
public const string RankRuleModel = "RankRuleModel";
public const string PackrewardModel = "PackrewardModel";
public const string GoldRewardModel = "GoldRewardModel";
public const string AddviewnewModel = "AddviewnewModel";
public const string NewTaskModel = "NewTaskModel";
public const string GetTaskRewardModel = "GetTaskRewardModel";
public const string PettyAwardModel = "PettyAwardModel";
@@ -17,15 +17,11 @@ namespace ChillConnect
moduleManager.AddModel(ModelConst.OpenBgModel, new OpenBgModel());
moduleManager.AddModel(ModelConst.PrivacyModel, new PrivacyModel());
moduleManager.AddModel(ModelConst.RewardModel, new RewardModel());
moduleManager.AddModel(ModelConst.ChoosePropModel, new ChoosePropModel());
moduleManager.AddModel(ModelConst.BuyPropModel, new BuyPropModel());
moduleManager.AddModel(ModelConst.GameResultModel, new GameResultModel());
moduleManager.AddModel(ModelConst.AddViewModel, new AddViewModel());
moduleManager.AddModel(ModelConst.OpenGameModel, new OpenGameModel());
moduleManager.AddModel(ModelConst.RewardboxModel, new RewardboxModel());
moduleManager.AddModel(ModelConst.PayloadingModel, new PayloadingModel());
moduleManager.AddModel(ModelConst.FXWndModel, new FXWndModel());
moduleManager.AddModel(ModelConst.WheelViewModel, new WheelViewModel());
moduleManager.AddModel(ModelConst.BuygoldModel, new BuygoldModel());
moduleManager.AddModel(ModelConst.GameMenuModel, new GameMenuModel());
moduleManager.AddModel(ModelConst.PersonViewModel, new PersonViewModel());
@@ -36,17 +32,13 @@ namespace ChillConnect
moduleManager.AddModel(ModelConst.SaveingPotModel, new SaveingPotModel());
moduleManager.AddModel(ModelConst.ResurgenceModel, new ResurgenceModel());
moduleManager.AddModel(ModelConst.FirstRewardModel, new FirstRewardModel());
moduleManager.AddModel(ModelConst.ThreeDaysGiftModel, new ThreeDaysGiftModel());
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.RewardMulNewModel, new RewardMulNewModel());
moduleManager.AddModel(ModelConst.AdcomingModel, new AdcomingModel());
moduleManager.AddModel(ModelConst.AddViewoffModel, new AddViewoffModel());
moduleManager.AddModel(ModelConst.PackrewardModel, new PackrewardModel());
moduleManager.AddModel(ModelConst.GoldRewardModel, new GoldRewardModel());
moduleManager.AddModel(ModelConst.AddviewnewModel, new AddviewnewModel());
moduleManager.AddModel(ModelConst.NewTaskModel, new NewTaskModel());
moduleManager.AddModel(ModelConst.GetTaskRewardModel, new GetTaskRewardModel());
moduleManager.AddModel(ModelConst.PettyAwardModel, new PettyAwardModel());
@@ -72,15 +64,11 @@ namespace ChillConnect
moduleManager.AddUICtrl(UICtrlConst.OpenBgUICtrl, new OpenBgUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PrivacyUICtrl, new PrivacyUICtrl());
moduleManager.AddUICtrl(UICtrlConst.RewardUICtrl, new RewardUICtrl());
moduleManager.AddUICtrl(UICtrlConst.ChoosePropUICtrl, new ChoosePropUICtrl());
moduleManager.AddUICtrl(UICtrlConst.BuyPropUICtrl, new BuyPropUICtrl());
moduleManager.AddUICtrl(UICtrlConst.GameResultUICtrl, new GameResultUICtrl());
moduleManager.AddUICtrl(UICtrlConst.AddViewUICtrl, new AddViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.OpenGameUICtrl, new OpenGameUICtrl());
moduleManager.AddUICtrl(UICtrlConst.RewardboxUICtrl, new RewardboxUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PayloadingUICtrl, new PayloadingUICtrl());
moduleManager.AddUICtrl(UICtrlConst.FXWndUICtrl, new FXWndUICtrl());
moduleManager.AddUICtrl(UICtrlConst.WheelViewUICtrl, new WheelViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.BuygoldUICtrl, new BuygoldUICtrl());
moduleManager.AddUICtrl(UICtrlConst.GameMenuUICtrl, new GameMenuUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PersonViewUICtrl, new PersonViewUICtrl());
@@ -91,17 +79,13 @@ namespace ChillConnect
moduleManager.AddUICtrl(UICtrlConst.SaveingPotUICtrl, new SaveingPotUICtrl());
moduleManager.AddUICtrl(UICtrlConst.ResurgenceUICtrl, new ResurgenceUICtrl());
moduleManager.AddUICtrl(UICtrlConst.FirstRewardUICtrl, new FirstRewardUICtrl());
moduleManager.AddUICtrl(UICtrlConst.ThreeDaysGiftUICtrl, new ThreeDaysGiftUICtrl());
moduleManager.AddUICtrl(UICtrlConst.RewardMulNewUICtrl, new RewardMulNewUICtrl());
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.PackrewardUICtrl, new PackrewardUICtrl());
moduleManager.AddUICtrl(UICtrlConst.GoldRewardUICtrl, new GoldRewardUICtrl());
moduleManager.AddUICtrl(UICtrlConst.AddviewnewUICtrl, new AddviewnewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.NewTaskUICtrl, new NewTaskUICtrl());
moduleManager.AddUICtrl(UICtrlConst.GetTaskRewardUICtrl, new GetTaskRewardUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PettyAwardUICtrl, new PettyAwardUICtrl());
@@ -130,15 +114,11 @@ namespace ChillConnect
moduleManager.AddCtrl(CtrlConst.PrivacyCtrl, new PrivacyCtrl());
moduleManager.AddCtrl(CtrlConst.RewardCtrl, new RewardCtrl());
moduleManager.AddCtrl(CtrlConst.PreferencesDataReadyCtrl, new PreferencesDataReadyCtrl());
moduleManager.AddCtrl(CtrlConst.ChoosePropCtrl, new ChoosePropCtrl());
moduleManager.AddCtrl(CtrlConst.BuyPropCtrl, new BuyPropCtrl());
moduleManager.AddCtrl(CtrlConst.GameResultCtrl, new GameResultCtrl());
moduleManager.AddCtrl(CtrlConst.AddViewCtrl, new AddViewCtrl());
moduleManager.AddCtrl(CtrlConst.OpenGameCtrl, new OpenGameCtrl());
moduleManager.AddCtrl(CtrlConst.RewardboxCtrl, new RewardboxCtrl());
moduleManager.AddCtrl(CtrlConst.PayloadingCtrl, new PayloadingCtrl());
moduleManager.AddCtrl(CtrlConst.FXWndCtrl, new FXWndCtrl());
moduleManager.AddCtrl(CtrlConst.WheelViewCtrl, new WheelViewCtrl());
moduleManager.AddCtrl(CtrlConst.BuygoldCtrl, new BuygoldCtrl());
moduleManager.AddCtrl(CtrlConst.GameMenuCtrl, new GameMenuCtrl());
moduleManager.AddCtrl(CtrlConst.PersonViewCtrl, new PersonViewCtrl());
@@ -149,17 +129,13 @@ namespace ChillConnect
moduleManager.AddCtrl(CtrlConst.SaveingPotCtrl, new SaveingPotCtrl());
moduleManager.AddCtrl(CtrlConst.ResurgenceCtrl, new ResurgenceCtrl());
moduleManager.AddCtrl(CtrlConst.FirstRewardCtrl, new FirstRewardCtrl());
moduleManager.AddCtrl(CtrlConst.ThreeDaysGiftCtrl, new ThreeDaysGiftCtrl());
moduleManager.AddCtrl(CtrlConst.RewardMulNewCtrl, new RewardMulNewCtrl());
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.PackrewardCtrl, new PackrewardCtrl());
moduleManager.AddCtrl(CtrlConst.GoldRewardCtrl, new GoldRewardCtrl());
moduleManager.AddCtrl(CtrlConst.AddviewnewCtrl, new AddviewnewCtrl());
moduleManager.AddCtrl(CtrlConst.NewTaskCtrl, new NewTaskCtrl());
moduleManager.AddCtrl(CtrlConst.GetTaskRewardCtrl, new GetTaskRewardCtrl());
moduleManager.AddCtrl(CtrlConst.PettyAwardCtrl, new PettyAwardCtrl());
@@ -187,14 +163,10 @@ namespace ChillConnect
moduleManager.AddUIType(UIConst.OpenBgUI, typeof(OpenBgUI));
moduleManager.AddUIType(UIConst.PrivacyUI, typeof(PrivacyUI));
moduleManager.AddUIType(UIConst.RewardUI, typeof(RewardUI));
moduleManager.AddUIType(UIConst.ChoosePropUI, typeof(ChoosePropUI));
moduleManager.AddUIType(UIConst.BuyPropUI, typeof(BuyPropUI));
moduleManager.AddUIType(UIConst.GameResultUI, typeof(GameResultUI));
moduleManager.AddUIType(UIConst.AddViewUI, typeof(AddViewUI));
moduleManager.AddUIType(UIConst.OpenGameUI, typeof(OpenGameUI));
moduleManager.AddUIType(UIConst.RewardboxUI, typeof(RewardboxUI));
moduleManager.AddUIType(UIConst.PayloadingUI, typeof(PayloadingUI));
moduleManager.AddUIType(UIConst.WheelViewUI, typeof(WheelViewUI));
moduleManager.AddUIType(UIConst.BuygoldUI, typeof(BuygoldUI));
moduleManager.AddUIType(UIConst.GameMenuUI, typeof(GameMenuUI));
moduleManager.AddUIType(UIConst.PersonViewUI, typeof(PersonViewUI));
@@ -205,17 +177,13 @@ namespace ChillConnect
moduleManager.AddUIType(UIConst.SaveingPotUI, typeof(SaveingPotUI));
moduleManager.AddUIType(UIConst.ResurgenceUI, typeof(ResurgenceUI));
moduleManager.AddUIType(UIConst.FirstRewardUI, typeof(FirstRewardUI));
moduleManager.AddUIType(UIConst.ThreeDaysGiftUI, typeof(ThreeDaysGiftUI));
moduleManager.AddUIType(UIConst.RewardMulNewUI, typeof(RewardMulNewUI));
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.PackrewardUI, typeof(PackrewardUI));
moduleManager.AddUIType(UIConst.GoldRewardUI, typeof(GoldRewardUI));
moduleManager.AddUIType(UIConst.AddviewnewUI, typeof(AddviewnewUI));
moduleManager.AddUIType(UIConst.NewTaskUI, typeof(NewTaskUI));
moduleManager.AddUIType(UIConst.GetTaskRewardUI, typeof(GetTaskRewardUI));
moduleManager.AddUIType(UIConst.PettyAwardUI, typeof(PettyAwardUI));
-15
View File
@@ -12,44 +12,29 @@ namespace ChillConnect
public const string OpenBgUI = "OpenBgUI";
public const string PrivacyUI = "PrivacyUI";
public const string RewardUI = "RewardUI";
public const string ChoosePropUI = "ChoosePropUI";
public const string H5UI = "H5UI";
public const string RainPlayUI = "RainPlayUI";
public const string GameResultUI = "GameResultUI";
public const string AddViewUI = "AddViewUI";
public const string BuyPropUI = "BuyPropUI";
public const string OpenGameUI = "OpenGameUI";
public const string RewardboxUI = "RewardboxUI";
public const string PayloadingUI = "PayloadingUI";
public const string HallUI = "HallUI";
public const string WheelViewUI = "WheelViewUI";
public const string PassViewUI = "PassViewUI";
public const string PassunlockUI = "PassunlockUI";
public const string PackrewardUI = "PackrewardUI";
public const string BuygoldUI = "BuygoldUI";
public const string BuyConfirmUI = "BuyConfirmUI";
public const string GameMenuUI = "GameMenuUI";
public const string EggViewUI = "EggViewUI";
public const string PersonViewUI = "PersonViewUI";
public const string TipsViewUI = "TipsViewUI";
public const string LevelRewardUI = "LevelRewardUI";
public const string SignInViewUI = "SignInViewUI";
public const string ThreeDaysGiftUI = "ThreeDaysGiftUI";
public const string MakeupConfirmUI = "MakeupConfirmUI";
public const string SaveingPotUI = "SaveingPotUI";
public const string ResurgenceUI = "ResurgenceUI";
public const string RewardMulNewUI = "RewardMulNewUI";
public const string FirstRewardUI = "FirstRewardUI";
public const string BroadcastUI = "BroadcastUI";
public const string RecordViewUI = "RecordViewUI";
public const string AdcomingUI = "AdcomingUI";
public const string FAQUI = "FAQUI";
public const string AddViewoffUI = "AddViewoffUI";
public const string RankUI = "RankUI";
public const string RankRewardUI = "RankRewardUI";
public const string RankRuleUI = "RankRuleUI";
public const string GoldRewardUI = "GoldRewardUI";
public const string AddviewnewUI = "AddviewnewUI";
public const string GetTaskRewardUI = "GetTaskRewardUI";
public const string NewTaskUI = "NewTaskUI";
public const string PettyAwardUI = "PettyAwardUI";
@@ -6,7 +6,6 @@ namespace ChillConnect
public const string LoadingUICtrl = "LoadingUICtrl";
public const string RewardAniUICtrl = "RewardAniUICtrl";
public const string FXWndUICtrl = "FXWndUICtrl";
public const string BuyPropUICtrl = "BuyPropUICtrl";
public const string GameResultUICtrl = "GameResultUICtrl";
public const string MenuUICtrl = "MenuUICtrl";
public const string NetLoadingUICtrl = "NetLoadingUICtrl";
@@ -14,20 +13,13 @@ namespace ChillConnect
public const string RewardUICtrl = "RewardUICtrl";
public const string H5UICtrl = "H5UICtrl";
public const string RainPlayUICtrl = "RainPlayUICtrl";
public const string ChoosePropUICtrl = "ChoosePropUICtrl";
public const string OpenBgUICtrl = "OpenBgUICtrl";
public const string PrivacyUICtrl = "PrivacyUICtrl";
public const string AddViewUICtrl = "AddViewUICtrl";
public const string OpenGameUICtrl = "OpenGameUICtrl";
public const string RewardboxUICtrl = "RewardboxUICtrl";
public const string PayloadingUICtrl = "PayloadingUICtrl";
public const string HallUICtrl = "HallUICtrl";
public const string WheelViewUICtrl = "WheelViewUICtrl";
public const string BuygoldUICtrl = "BuygoldUICtrl";
public const string BuyConfirmUICtrl = "BuyConfirmUICtrl";
public const string GameMenuUICtrl = "GameMenuUICtrl";
public const string EggViewUICtrl = "EggViewUICtrl";
public const string PersonViewUICtrl = "PersonViewUICtrl";
public const string TipsViewUICtrl = "TipsViewUICtrl";
public const string LevelRewardUICtrl = "LevelRewardUICtrl";
@@ -35,22 +27,14 @@ namespace ChillConnect
public const string MakeupConfirmUICtrl = "MakeupConfirmUICtrl";
public const string SaveingPotUICtrl = "SaveingPotUICtrl";
public const string ResurgenceUICtrl = "ResurgenceUICtrl";
public const string RewardMulNewUICtrl = "RewardMulNewUICtrl";
public const string FirstRewardUICtrl = "FirstRewardUICtrl";
public const string ThreeDaysGiftUICtrl = "ThreeDaysGiftUICtrl";
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";
public const string FAQUICtrl = "FAQUICtrl";
public const string AddViewoffUICtrl = "AddViewoffUICtrl";
public const string RankUICtrl = "RankUICtrl";
public const string RankRewardUICtrl = "RankRewardUICtrl";
public const string RankRuleUICtrl = "RankRuleUICtrl";
public const string PackrewardUICtrl = "PackrewardUICtrl";
public const string GoldRewardUICtrl = "GoldRewardUICtrl";
public const string AddviewnewUICtrl = "AddviewnewUICtrl";
public const string NewTaskUICtrl = "NewTaskUICtrl";
public const string GetTaskRewardUICtrl = "GetTaskRewardUICtrl";
public const string PettyAwardUICtrl = "PettyAwardUICtrl";
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 3ec7125d0333e284db6729a02dd964b0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,42 +0,0 @@
namespace ChillConnect
{
public class AddViewCtrl : BaseCtrl
{
public static AddViewCtrl Instance { get; private set; }
private AddViewModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.AddViewModel) as AddViewModel;
}
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: b6058e09514454ec394a1478f2775964
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,43 +0,0 @@
namespace ChillConnect
{
public class AddViewModel : 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
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1b0a4fbab97e64d5b982896192bb6483
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,224 +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 AddViewUI : BaseUI
{
private AddViewUICtrl ctrl;
private AddViewModel model;
private com_addView ui;
public int ad_cool_down = 120;
public btn_watchAd btn_WatchAd;
public AddViewUI(AddViewUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.AddViewUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "AddCell_12";
uiInfo.assetName = "com_addView";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddViewModel) as AddViewModel;
}
protected override void OnClose()
{
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= updateWatchCD;
if (GameHelper.IsAdModelOfPay())
{
AdRedeemManager.Instance.Destroy();
}
if (need_open_turn) GameHelper.CallShowTurn();
}
private bool need_open_turn = false;
protected override void OnBind()
{
ui = baseUI as com_addView;
}
protected override void OnOpenBefore(object args)
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneShow);
if (args != null) need_open_turn = (bool)args;
// ad_cool_down = ConfigSystem.GetConfig<CommonModel>().exchangeCD;
// btn_WatchAd = ui.btn_watch as btn_watchAd;
if (!GameHelper.IsGiftSwitch())
{
GameHelper.GetCommonModel().addspace=1;
}
if (GameHelper.IsAdModelOfPay())
{
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
ui.btn_watch.GetChild("img_saveingpot").visible = true;
}
btn_watchAd btn = ui.btn_watch as btn_watchAd;
btn.buy_type.selectedIndex = 0;
AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.buy_one), ui.btn_watch as btn_watchAd, SetTextString);
ui.pay_type.selectedIndex = 0;
AdRedeemManager.Instance.Start();
SetTextString();
}
else
{
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
ui.btn_max_pay.GetChild("img_saveingpot").visible = true;
}
ui.pay_type.selectedIndex = 1;
decimal price = (decimal)GameHelper.GetCommonModel().addspace2;
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),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
InitView();
}
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))
{
CtrlCloseUI();
GameDispatcher.Instance.Dispatch(GameMsg.resurgence_close);
}
}
//初始化页面逻辑
private void InitView()
{
ui.btn_close.SetClick(() =>
{
CtrlCloseUI();
GameDispatcher.Instance.Dispatch(GameMsg.resurgence_close);
});
// HallManager.Instance.UpdateSecondEvent += updateWatchCD;
// updateWatchCD();
// checkBtnState();
InitBroadCast();
HallManager.Instance.UpdateSecondEvent += updateWatchCD;
updateWatchCD();
if (GameHelper.IsGiftSwitch())
{
ui.broad.visible = true;
}
}
public void SetTextString()
{
var need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.buy_one));
var myAd = AdRedeemManager.Instance.GetLookRewardADNum();
ui.tips.SetVar("num", need.ToString()).FlushVars();
ui.ads.SetVar("num", myAd.ToString()).FlushVars();
ui.ads.SetVar("need", need.ToString()).FlushVars();
}
void updateWatchCD()
{
broadtime++;
BroadCast();
}
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: 40b42d370a2c34db89da3decb4b3ba0d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,71 +0,0 @@
namespace ChillConnect
{
public class AddViewUICtrl : BaseUICtrl
{
private AddViewUI ui;
private AddViewModel model;
private uint openUIMsg = UICtrlMsg.BuyslotUI_Open;
private uint closeUIMsg = UICtrlMsg.BuyslotUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddViewModel) as AddViewModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new AddViewUI(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: 4c4feca1f3dc94e0291dbe534b773067
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ba8038fc2cb1842cbbdae804b4f0982c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,25 +0,0 @@
namespace ChillConnect
{
public class AddviewnewCtrl : BaseCtrl
{
public static AddviewnewCtrl Instance { get; private set; }
private AddviewnewModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.AddviewnewModel) as AddviewnewModel;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4cc0dc1a5313d412a83b8e39a7efb8fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,20 +0,0 @@
namespace ChillConnect
{
public class AddviewnewModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
#endregion
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 046c52d08595a4040a001d8004b8875c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,258 +0,0 @@
using FGUI.Common_01;
using UnityEngine;
using FairyGUI;
using IgnoreOPS;
using System;
using Spine.Unity;
using FGUI.AddCell_12;
using SGModule.Net;
using SGModule.NetKit;
namespace ChillConnect
{
public class AddviewnewUI : BaseUI
{
private AddviewnewUICtrl ctrl;
private AddviewnewModel model;
private FGUI.ZM_AddCell_12.com_addView_new ui;
private bool is_off = false;
public AddviewnewUI(AddviewnewUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.AddviewnewUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "ZM_AddCell_12";
uiInfo.assetName = "com_addView_new";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddviewnewModel) as AddviewnewModel;
}
private Action closeCallback;
protected override void OnClose()
{
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= updateWatchCD;
closeCallback?.Invoke();
AdRedeemManager.Instance.Destroy();
}
protected override void OnBind()
{
ui = baseUI as FGUI.ZM_AddCell_12.com_addView_new;
}
protected override void OnOpenBefore(object args)
{
// if (ui.btn_watch is btn_watchAd watchAdBtn)
// {
// CommonTools.GetInstance.InitAdBtnAnim(watchAdBtn.icon_Parent);
// }
if (SaveData.GetSaveObject().addview_off_time > GameHelper.GetNowTime()) is_off = true;
ui.text_out.text = "x" + GameHelper.GetItemNumber(0);
ui.text_back.text = "x" + GameHelper.GetItemNumber(1);
ui.text_refresh.text = "x" + GameHelper.GetItemNumber(2);
ui.text_level.text = "Level " + GameHelper.GetLevel();
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewShow);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewShow, 1);
ui.btn_play.SetClick(() =>
{
GameHelper.gameType = 0;
GameDispatcher.Instance.Dispatch(GameMsg.OpenGame);
CtrlCloseUI();
});
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
(ui.btn_max_pay.GetChild("img_saveingpot") as GImage).visible = true;
}
// (ui.btn_watch.GetChild("btn_text") as GTextField).scale = new Vector2(0.7f, 0.7f);
// (ui.btn_watch.GetChild("title1") as GTextField).scale = new Vector2(0.7f, 0.7f);
// ui.btn_watch.GetChild("img_saveingpot").x += 20;
// ui.btn_watch.GetChild("img_saveingpot").y -= 33;
// ad_cool_down = ConfigSystem.GetConfig<CommonModel>().exchangeCD;
// btn_WatchAd = ui.btn_watch as btn_watchAd;
if (GameHelper.IsAdModelOfPay())
{
if (is_off)
{
AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.buy_one_off), ui.btn_watch as btn_watchAd, () =>
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewClick);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewClick, 1);
SetTextString();
});
ui.pay_type.selectedIndex = 0;
AdRedeemManager.Instance.Start();
}
else
{
AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.buy_one), ui.btn_watch as btn_watchAd, () =>
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewClick);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewClick, 1);
SetTextString();
});
ui.pay_type.selectedIndex = 0;
AdRedeemManager.Instance.Start();
}
SetTextString();
}
else
{
ui.pay_type.selectedIndex = 1;
if (is_off)
{
decimal price = (decimal)GameHelper.GetCommonModel().AddDiscount2;
ui.btn_max_pay.title = GameHelper.getPrice(price);
ui.btn_max_pay.SetClick(() =>
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewClick);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewClick, 1);
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price * 100),
sku = PurchasingManager.GetPaySku(PayType.buy_one_off),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
else
{
decimal price = (decimal)GameHelper.GetCommonModel().addspace2;
ui.btn_max_pay.title = GameHelper.getPrice(price);
ui.btn_max_pay.SetClick(() =>
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewClick);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewClick, 1);
ApplePayClass maxPayData = new ApplePayClass()
{
amount = (int)Math.Round(price * 100),
sku = PurchasingManager.GetPaySku(PayType.buy_one),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
}
InitView();
}
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.Sheep_item_refresh, SetItemNumber);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
GameDispatcher.Instance.RemoveListener(GameMsg.Sheep_item_refresh, SetItemNumber);
}
#endregion
void SetItemNumber(object a)
{
ui.text_out.text = "x" + GameHelper.GetItemNumber(0);
ui.text_back.text = "x" + GameHelper.GetItemNumber(1);
ui.text_refresh.text = "x" + GameHelper.GetItemNumber(2);
}
void pay_success(object str)
{
string type = (string)str;
if (type == PurchasingManager.GetPaySku(PayType.buy_one) || type == PurchasingManager.GetPaySku(PayType.buy_one_off))
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewSuccess);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewSuccess, 1);
SaveData.GetSaveObject().have_slot = true;
SaveData.saveDataFunc();
GameDispatcher.Instance.Dispatch(GameMsg.Slot_refresh);
ui.pay_type.selectedIndex = 2;
SkeletonAnimation addeffect = FXManager.Instance.SetFx<SkeletonAnimation>(ui.ani_parent1, Fx_Type.fx_addeffect, ref closeCallback);
addeffect.state.SetAnimation(0, "animation", true);
SkeletonAnimation addeffect1 = FXManager.Instance.SetFx<SkeletonAnimation>(ui.ani_parent2, Fx_Type.fx_addeffect_1, ref closeCallback);
addeffect1.state.SetAnimation(0, "animation", true);
// 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.OpenGame);
CtrlCloseUI();
});
HallManager.Instance.UpdateSecondEvent += updateWatchCD;
ui.btn_addback.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Open, 1);
});
ui.btn_addout.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Open, 0);
});
ui.btn_addrefresh.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Open, 2);
});
// updateWatchCD();
// checkBtnState();
}
void updateWatchCD()
{
}
public void SetTextString()
{
int need = 0;
if (is_off) need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.buy_one_off));
else need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.buy_one));
var myAd = AdRedeemManager.Instance.GetLookRewardADNum();
// ui.tips.SetVar("num", need.ToString()).FlushVars();
ui.ads.SetVar("num", myAd + "/").FlushVars();
ui.ads.SetVar("need", need.ToString()).FlushVars();
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 3b62f3687397048a0a4365a156cc3eac
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,73 +0,0 @@
namespace ChillConnect
{
public class AddviewnewUICtrl : BaseUICtrl
{
private AddviewnewUI ui;
private AddviewnewModel model;
private uint openUIMsg = UICtrlMsg.AddviewnewUI_Open;
private uint closeUIMsg = UICtrlMsg.AddviewnewUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddviewnewModel) as AddviewnewModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new AddviewnewUI(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: a375bc5ca46a34c92bc7dfa4c493c980
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: b3a59974b3d5f6d49b4e54ed7605922c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,42 +0,0 @@
namespace ChillConnect
{
public class BuyPropCtrl : BaseCtrl
{
public static BuyPropCtrl Instance { get; private set; }
private BuyPropModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.BuyPropModel) as BuyPropModel;
}
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: 58e27508a01b144eab047fc0579e3520
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,43 +0,0 @@
namespace ChillConnect
{
public class BuyPropModel : 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
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6f1d88ea5dfa34e1a927e5bef7f9c714
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,258 +0,0 @@
using System;
using FGUI.Common_01;
using FGUI.Prop_09;
using FGUI.store_17;
using IgnoreOPS;
using UnityEngine;
namespace ChillConnect
{
public class BuyPropUI : BaseUI
{
private BuyPropUICtrl ctrl;
private BuyPropModel model;
private com_prop ui;
private int state_;
private int prop_num = 1;
private int _price;
public BuyPropUI(BuyPropUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.BuyPropUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Prop_09";
uiInfo.assetName = "com_prop";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.BuyPropModel) as BuyPropModel;
}
protected override void OnClose()
{
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= UpdateCd;
}
protected override void OnBind()
{
ui = baseUI as com_prop;
}
protected override void OnOpenBefore(object args)
{
_price = ConfigSystem.GetConfig<CommonModel>().Purchaseprops;
state_ = (int)args;
ui.prop.selectedIndex = state_;
ui.btn_buy.SetClick(buyItem);
setBtnState(state_);
InitView();
setPropText();
SetAddText();
ui.btn_add.state.selectedIndex = 0;
ui.btn_jian.state.selectedIndex = 1;
ui.btn_add.SetClick(AddProNum);
ui.btn_jian.SetClick(ReduceProNum);
HallManager.Instance.UpdateSecondEvent += UpdateCd;
UpdateCd();
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) ui.img_saveingpot.visible = true;
ui.btn_watch.SetClick(() =>
{
buyItem();
});
}
void buyItem()
{
if (state_ == 0)
{
}
else if (state_ == 1)
{
}
else if (state_ == 2)
{
}
if (DataMgr.NewWatchCd.Value[state_ + 2] < Convert.ToInt32(GameHelper.GetNowTime()))
{
GameHelper.ShowVideoAd("reward_prop", isSuccess =>
{
if (isSuccess)
{
GameHelper.SetWatchCd(state_ + 2);
int numbers = GameHelper.GetItemNumber(state_);
numbers++;
GameHelper.SetItemNumber(state_, numbers);
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
GameHelper.ShowTips("The purchase was successful", true);
CtrlCloseUI();
}
});
}
// int price = _price * prop_num;
// if (GameHelper.CheckGoldNumber(price))
// {
// GameHelper.AddGoldNumber(-price);
// int numbers = GameHelper.GetItemNumber(state_);
// numbers += prop_num;
// GameHelper.SetItemNumber(state_, numbers);
// GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
// GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
// GameHelper.ShowTips("The purchase was successful", true);
//
// CtrlCloseUI();
//
// }
// else
// {
// GameHelper.ShowTips("Not enough gold");
// }
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
private void UpdateCd()
{
btn_watchAd btnWatch = ui.btn_watch as btn_watchAd;
// Debug.Log($"DataMgr.NewWatchCd.Value[state_ + 2]==={DataMgr.NewWatchCd.Value[state_ + 2]}");
if (DataMgr.NewWatchCd.Value[state_ + 2] > Convert.ToInt32(GameHelper.GetNowTime()))
{
btnWatch.enabled = false;
btnWatch.can_buy.selectedIndex = 1;
btnWatch.btn_text.text = CommonHelper.TimeFormat(DataMgr.NewWatchCd.Value[state_ + 2] - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
else
{
ui.btn_watch.enabled = true;
btnWatch.can_buy.selectedIndex = 0;
btnWatch.watch.text = "Watch AD";
}
}
private void AddProNum()
{
prop_num++;
SetAddText();
setPropText();
}
private void SetAddText()
{
ui.text_add.text = prop_num.ToString();
}
private void ReduceProNum()
{
prop_num--;
if (prop_num <= 1)
{
prop_num = 1;
}
setPropText();
SetAddText();
}
private void setPropText()
{
ui.btn_buy.GetChild("text_gold").text = GameHelper.Get101Str( _price * prop_num);
}
//初始化页面逻辑
private void InitView()
{
ui.btn_back.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Close);
});
// ui.btn_buy0.SetClick(() =>
// {
// state_ = 0;
// ui.prop.selectedIndex = 0;
// setBtnState(0);
// });
// ui.btn_buy1.SetClick(() =>
// {
// state_ = 1;
// ui.prop.selectedIndex = 1;
// setBtnState(1);
// });
// ui.btn_buy2.SetClick(() =>
// {
// state_ = 2;
// ui.prop.selectedIndex = 2;
// setBtnState(2);
// });
}
private void setBtnState(int index)
{
// ui.btn_buy0.tab_choose.selectedIndex = index == 0 ? 1 : 0;
// ui.btn_buy1.tab_choose.selectedIndex = index == 1 ? 1 : 0;
// ui.btn_buy2.tab_choose.selectedIndex = index == 2 ? 1 : 0;
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: d07e071d35d5041feaf834faa7cac3a0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,71 +0,0 @@
namespace ChillConnect
{
public class BuyPropUICtrl : BaseUICtrl
{
private BuyPropUI ui;
private BuyPropModel model;
private uint openUIMsg = UICtrlMsg.SheepwindowUI_Open;
private uint closeUIMsg = UICtrlMsg.SheepwindowUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.BuyPropModel) as BuyPropModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new BuyPropUI(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: b85f17625775040eb85b386d6c9c5c79
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: cf8752ba62de0944699341c95ac0fdc8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,42 +0,0 @@
namespace ChillConnect
{
public class ChoosePropCtrl : BaseCtrl
{
public static ChoosePropCtrl Instance { get; private set; }
private ChoosePropModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.ChoosePropModel) as ChoosePropModel;
}
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: 30f4147b6a9f34f8a98d5bbc0a788e6d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,43 +0,0 @@
namespace ChillConnect
{
public class ChoosePropModel : 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
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 24f4458949b044bf5ad0e021638528e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,206 +0,0 @@
using FGUI.Prop_09;
using IgnoreOPS;
using UnityEngine;
namespace ChillConnect
{
public class ChoosePropUI : BaseUI
{
private ChoosePropUICtrl ctrl;
private ChoosePropModel model;
private com_choose ui;
public ChoosePropUI(ChoosePropUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ChoosePropUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Prop_09";
uiInfo.assetName = "com_choose";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.ChoosePropModel) as ChoosePropModel;
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as com_choose;
}
protected override void OnOpenBefore(object args)
{
InitView();
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
//初始化页面逻辑
private void InitView()
{
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
ui.btn_ad.GetChild("img_saveingpot").visible = true;
}
// Debug.Log(GameHelper.GetLevelstate());
int state = GameHelper.GetLevelstate();
int need_gold = ConfigSystem.GetConfig<CommonModel>().RevivalCoins;
ui.btn_gold_buy.GetChild("text_gold").text = GameHelper.Get101Str(need_gold);
Debug.Log($"state===================:{state}");
initProp(state);
// ui.btn_thanks.SetClick(() =>
// {
// float[] cash_array = GameHelper.GetRewardValue(2);
// var temp = new SuccessData();
// temp.IsWin = false;
// temp.cash_number = cash_array[0];
// temp.IsLevelSuccess = true;
// temp.IsH5Reward = false;
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp);
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
// });
ui.btn_close.SetClick(() =>
{
clsoeFunc();
});
ui.btn_thanks.SetClick(() =>
{
clsoeFunc();
});
}
private static void clsoeFunc()
{
float[] cash_array = GameHelper.GetRewardValue(2);
var temp = new SuccessData();
temp.IsWin = false;
temp.cash_number = cash_array[0];
temp.IsLevelSuccess = true;
temp.IsH5Reward = false;
temp.boost_array = GameHelper.GetRewardBoost(2);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
private void initProp(int state)
{
int need_gold = ConfigSystem.GetConfig<CommonModel>().RevivalCoins;
if (state == 3)
{
ui.state.selectedIndex = ui._State_all_;
ui.btn_ad.SetClick(() =>
{
GameHelper.ShowVideoAd("reward_lobby", isSuccess =>
{
if (isSuccess)
{
// GameHelper.SetLevelstate(1);
GameHelper.SetLevelstate(0);
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
});
});
ui.btn_gold_buy.SetClick(() =>
{
if (GameHelper.CheckGoldNumber(need_gold))
{
GameHelper.AddGoldNumber(-need_gold);
// GameHelper.SetLevelstate(2);
GameHelper.SetLevelstate(0);
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
else
{
GameHelper.ShowTips("Not enough gold");
}
});
}
else if (state == 2)
{
ui.state.selectedIndex = ui._State_ad;
ui.btn_ad.SetClick(() =>
{
GameHelper.ShowVideoAd("reward_lobby", isSuccess =>
{
if (isSuccess)
{
GameHelper.SetLevelstate(0);
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
});
});
}
else if (state == 1)
{
ui.state.selectedIndex = ui._State_gold;
ui.btn_gold_buy.SetClick(() =>
{
if (GameHelper.CheckGoldNumber(need_gold))
{
GameHelper.AddGoldNumber(-need_gold);
GameHelper.SetLevelstate(0);
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
else
{
GameHelper.ShowTips("Not enough gold");
}
});
}
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 05d11be9302224ba99cc14d10974266f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,71 +0,0 @@
namespace ChillConnect
{
public class ChoosePropUICtrl : BaseUICtrl
{
private ChoosePropUI ui;
private ChoosePropModel model;
private uint openUIMsg = UICtrlMsg.ChoosePropUI_Open;
private uint closeUIMsg = UICtrlMsg.ChoosePropUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.ChoosePropModel) as ChoosePropModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ChoosePropUI(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: d012c092edd6c41a2bbbed3c72ca2bfe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: b05bab87ee5860d45b1e0e643cda6b64
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
-3
View File
@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 068c2a0f8e2744509a0ec2ed3b6126b3
timeCreated: 1749106141
@@ -1,44 +0,0 @@
using System.Collections;
using System.Collections.Generic;
namespace ChillConnect
{
public class PackrewardCtrl : BaseCtrl
{
public static PackrewardCtrl Instance { get; private set; }
private PackrewardModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.PackrewardModel) as PackrewardModel;
}
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: 6716776f97890437d8a618c997ea689d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,29 +0,0 @@
using System.Collections;
using System.Collections.Generic;
namespace ChillConnect
{
public class PackrewardModel : 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: 8f3f1bbd4dedd499bb4917a0a83b8d09
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,504 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FutureCore;
using FairyGUI;
using FGUI.Pack_16;
using DG.Tweening;
using FGUI.Common_01;
using System;
using IgnoreOPS;
using SGModule.Net;
using IgnoreOPS;
using SGModule.NetKit;
using Unity.VisualScripting;
namespace ChillConnect
{
public class PackrewardUI : BaseUI
{
private PackrewardUICtrl ctrl;
private PackrewardModel model;
private FGUI.Pack_16.com_packaward ui;
private List<Paidgift> list;
public PackrewardUI(PackrewardUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.PackrewardUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Pack_16";
uiInfo.assetName = "com_packaward";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.PackrewardModel) as PackrewardModel;
}
private bool isAutoPop = false;
protected override void OnClose()
{
AdRedeemManager.Instance.Destroy();
GameHelper.showGameUI = true;
// WebviewManager.Instance.SetDarkThough(true);
GameDispatcher.Instance.Dispatch(GameMsg.pack_close);
HallManager.Instance.UpdateEvent -= InitView;
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);
}
GameHelper.CallShowTurn();
}
protected override void OnBind()
{
ui = baseUI as FGUI.Pack_16.com_packaward;
}
protected override void OnOpenBefore(object args)
{
if (Screen.safeArea.y != 0)
{
//刘海屏
ui.gold.y += Screen.safeArea.y;
}
if (!GameHelper.IsGiftSwitch())
{
ConfigSystem.GetConfig<PaidgiftModel>().DataList[0].Paid_price = 1;
ConfigSystem.GetConfig<PaidgiftModel>().DataList[1].Paid_price = 1;
}
ui.panel_parent.panel.gift.selectedIndex = GameHelper.IsGiftSwitch() ? 1 : 0;
bool need_scroll = false;
PackRewardData Datas = args as PackRewardData;
if (args != null)
{
Datas = args as PackRewardData;
need_scroll = Datas.isNeedScroll;
isAutoPop = Datas.isAutoPop;
}
if (need_scroll) ui.panel_parent.scrollPane.ScrollDown(300, false);
if (need_scroll)
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(), Property.RemoveAdShow);
}
else
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(), Property.FirstPackShow);
}
ui.gold.GetChild("text_gold").text = GameHelper.Get101Str(GameHelper.GetGoldNumber());
list = ConfigSystem.GetConfig<PaidgiftModel>().DataList;
if (!GameHelper.IsGiftSwitch())
{
list[0].Paid_price = 1;
list[1].Paid_price = 1;
}
if (GameHelper.IsAdModelOfPay())
{
// if (!GameHelper.IsGiftSwitch())
// {
// if (SaveData.GetSaveObject().is_get_packreward)
// {
// }
// ui.panel_parent.panel.btn_buypack.SetClick(() =>
// {
// GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, PurchasingManager.GetPaySku(PayType.pack_reward));
// InitView();
// });
// ui.panel_parent.panel.btn_buyremovead.SetClick(() =>
// {
// GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, PurchasingManager.GetPaySku(PayType.remove_ad));
// InitView();
// });
// }
// else
// {
// AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.pack_reward),
// ui.panel_parent.panel.btn_buypack as btn_watchAd, SetTextString1);
// AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.remove_ad),
// ui.panel_parent.panel.btn_buyremovead as btn_watchAd, SetTextString1);
// }
}
HallManager.Instance.UpdateEvent += InitView;
InitView();
}
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.remove_ad))
{
var gold = list[1].coins_quantity;
var start = GameHelper.GetUICenterPosition(ui.panel_parent.panel.text_goldnum2);
var end = GameHelper.GetUICenterPosition(ui.gold.GetChild("icon"));
var rewardData = new RewardData();
var rewardSingleData = new RewardSingleData(101, gold, RewardOrigin.AdTask)
{
startPosition = start,
endPosition = end,
};
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 = GameHelper.Get101Str((decimal)value); });
});
});
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AdcomingUI_Close);
SaveData.GetSaveObject().is_get_removead = true;
InitView();
}
else if (type == PurchasingManager.GetPaySku(PayType.pack_reward))
{
var start = GameHelper.GetUICenterPosition(ui.panel_parent.panel.text_goldnum);
var end = GameHelper.GetUICenterPosition(ui.gold.GetChild("icon"));
var gold = list[0].coins_quantity;
var rewardData = new RewardData();
var rewardSingleData = new RewardSingleData(101, gold, RewardOrigin.AdTask)
{
startPosition = start,
endPosition = new Vector2(end.x - 100, end.y - 180)
};
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 = GameHelper.Get101Str((decimal)value); });
});
});
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
SaveData.GetSaveObject().is_get_packreward = true;
Debug.Log(SaveData.GetSaveObject().is_get_packreward + "////////////////////////");
InitView();
}
}
//初始化页面逻辑
private int gold_num = 300;
private int back_num = 1;
private int out_num = 1;
private int refresh_num = 1;
private void InitView()
{
if (!GameHelper.IsGiftSwitch())
{
ConfigSystem.GetConfig<PaidgiftModel>().DataList[0].Paid_price = 1;
ConfigSystem.GetConfig<PaidgiftModel>().DataList[1].Paid_price = 1;
list= ConfigSystem.GetConfig<PaidgiftModel>().DataList;
}
gold_num = list[0].coins_quantity;
back_num = list[0].props_quantity[1];
out_num = list[0].props_quantity[0];
refresh_num = list[0].props_quantity[2];
ui.panel_parent.panel.btn_close0.SetClick(CtrlCloseUI);
ui.panel_parent.panel.btn_close1.SetClick(CtrlCloseUI);
ui.panel_parent.panel.text_goldnum.text = "x" + GameHelper.Get101Str(gold_num);
ui.panel_parent.panel.text_backnum1.text = "x" + back_num;
ui.panel_parent.panel.text_outnum.text = "x" + out_num;
ui.panel_parent.panel.text_refreshnum.text = "x" + refresh_num;
var buy_text = ui.panel_parent.panel.btn_buypack.GetChild("title") as GTextField;
buy_text.SetVar("price", list[0].Paid_price.ToString()).FlushVars();
ui.panel_parent.panel.text_goldnum2.text = "x" + GameHelper.Get101Str(list[1].coins_quantity);
var buy_text1 = ui.panel_parent.panel.btn_buyremovead.GetChild("title") as GTextField;
buy_text1.SetVar("price", list[1].Paid_price.ToString()).FlushVars();
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.panel_parent.panel.btn_max_pack.GetChild("img_saveingpot") as GImage).visible = true;
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.panel_parent.panel.btn_max_remove.GetChild("img_saveingpot") as GImage).visible = true;
if (!GameHelper.IsAdModelOfPay())
{
ui.panel_parent.panel.pay_type.selectedIndex = 1;
decimal price_pack = (decimal)list[0].Paid_price2;
ui.panel_parent.panel.btn_max_pack.title = GameHelper.getPrice(price_pack);
bool is_get = SaveData.GetSaveObject().is_get_packreward;
if (is_get)
{
ui.panel_parent.panel.btn_max_pack.enabled = false;
ui.panel_parent.panel.btn_max_pack.SetClick(() => { });
}
else
{
ui.panel_parent.panel.btn_max_pack.SetClick(() =>
{
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price_pack * 100),
sku = PurchasingManager.GetPaySku(PayType.pack_reward),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
decimal price_remove = (decimal)list[1].Paid_price2;
ui.panel_parent.panel.btn_max_remove.title = GameHelper.getPrice(price_remove);
bool is_get1 = SaveData.GetSaveObject().is_get_removead;
if (is_get1)
{
ui.panel_parent.panel.btn_max_remove.enabled = false;
ui.panel_parent.panel.btn_max_remove.SetClick(() => { });
}
else
{
string sku = PurchasingManager.GetPaySku(PayType.pack_reward);
// if (GameHelper.IsGiftSwitch())
// {
// sku = PurchasingManager.GetPaySku(PayType.pack_reward);
// }
// else
// {
sku = PurchasingManager.GetPaySku(PayType.remove_ad);
//}
ui.panel_parent.panel.btn_max_remove.SetClick(() =>
{
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price_remove * 100),
sku = sku,
type = PurchasingManager.GetPaySku(PayType.remove_ad),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
}
else
{
ui.panel_parent.panel.pay_type.selectedIndex = 0;
AdRedeemManager.Instance.Start();
SetTextString1();
}
ui.panel_parent.panel.btn_max_remove.grayed = false;
if (GameHelper.IsAdModelOfPay())
{
if (SaveData.GetSaveObject().is_get_packreward)
{
(ui.panel_parent.panel.btn_buypack as btn_watchAd).buy_state.selectedIndex = 1;
(ui.panel_parent.panel.btn_buypack as btn_watchAd).title = "Received";
(ui.panel_parent.panel.btn_buypack as btn_watchAd).enabled = false;
}
else
{
// Debug.Log(AdRedeemManager.Instance.GetLookRewardADNum());
// Debug.Log(ConfigSystem.GetConfig<PaidgiftModel>().DataList[0].Paid_price);
if (AdRedeemManager.Instance.GetLookRewardADNum() >= ConfigSystem.GetConfig<PaidgiftModel>().DataList[0].Paid_price)
{
(ui.panel_parent.panel.btn_buypack as btn_watchAd).enabled = true;
(ui.panel_parent.panel.btn_buypack as btn_watchAd).buy_state.selectedIndex = 1;
(ui.panel_parent.panel.btn_buypack as btn_watchAd).title = "Receive";
ui.panel_parent.panel.btn_buypack.SetClick(() =>
{
AdRedeemData adRedeemData = new AdRedeemData
{
type = PurchasingManager.GetPaySku(PayType.pack_reward),
ad_count = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.pack_reward))
};
AdRedeemManager.Instance.Redeem(adRedeemData);
});
}
else if (SaveData.GetSaveObject()._watch_ad_cd > GameHelper.GetNowTime())
{
(ui.panel_parent.panel.btn_buypack as btn_watchAd).enabled = false;
(ui.panel_parent.panel.btn_buypack as btn_watchAd).buy_state.selectedIndex = 0;
(ui.panel_parent.panel.btn_buypack as btn_watchAd).can_buy.selectedIndex = 1;
(ui.panel_parent.panel.btn_buypack as btn_watchAd).btn_text.text = CommonHelper.TimeFormat((int)SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
else
{
(ui.panel_parent.panel.btn_buypack as btn_watchAd).enabled = true;
(ui.panel_parent.panel.btn_buypack as btn_watchAd).buy_state.selectedIndex = 0;
(ui.panel_parent.panel.btn_buypack as btn_watchAd).can_buy.selectedIndex = 0;
ui.panel_parent.panel.btn_buypack.SetClick(() =>
{
GameHelper.ShowVideoAd("buy_add_one", isSuccess =>
{
if (isSuccess)
{
var ad_times = Convert.ToInt32(GameHelper.GetNowTime());
SaveData.GetSaveObject()._watch_ad_cd = ad_times + ConfigSystem.GetConfig<CommonModel>().exchangeCD;
InitView();
}
});
// AdRedeemManager.Instance.SendEventClickByName(PurchasingManager.GetPaySku(PayType.pack_reward), "click");
// AdRedeemManager.Instance.ShowVideoAd("buy_add_one", () =>
// {
// TimerHelper.mEasy.AddTimer(0.1f, () =>
// {
// var ad_times = Convert.ToInt32(GameHelper.GetNowTime());
// SaveData.GetSaveObject()._watch_ad_cd = ad_times + ConfigSystem.GetConfig<CommonModel>().exchangeCD;
// InitView();
// });
// });
});
}
}
if (SaveData.GetSaveObject().is_get_removead && GameHelper.GetNowTime() < SaveData.GetSaveObject().remove_ad_time)
{
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).buy_state.selectedIndex = 0;
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).can_buy.selectedIndex = 1;
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).btn_text.text = CommonHelper.TimeFormat(SaveData.GetSaveObject().remove_ad_time - (int)GameHelper.GetNowTime(), CountDownType.Hour);
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).enabled = false;
}
else
{
if (AdRedeemManager.Instance.GetLookRewardADNum() >= ConfigSystem.GetConfig<PaidgiftModel>().DataList[1].Paid_price)
{
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).enabled = true;
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).buy_state.selectedIndex = 1;
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).title = "Receive";
ui.panel_parent.panel.btn_buyremovead.SetClick(() =>
{
AdRedeemData adRedeemData = new AdRedeemData
{
type = PurchasingManager.GetPaySku(PayType.remove_ad),
ad_count = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.remove_ad))
};
AdRedeemManager.Instance.Redeem(adRedeemData);
});
}
else if (SaveData.GetSaveObject()._watch_ad_cd > GameHelper.GetNowTime())
{
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).enabled = false;
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).buy_state.selectedIndex = 0;
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).can_buy.selectedIndex = 1;
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).btn_text.text = CommonHelper.TimeFormat((int)SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
else
{
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).enabled = true;
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).buy_state.selectedIndex = 0;
(ui.panel_parent.panel.btn_buyremovead as btn_watchAd).can_buy.selectedIndex = 0;
ui.panel_parent.panel.btn_buyremovead.SetClick(() =>
{
GameHelper.ShowVideoAd("buy_add_one", isSuccess =>
{
if (isSuccess)
{
var ad_times = Convert.ToInt32(GameHelper.GetNowTime());
SaveData.GetSaveObject()._watch_ad_cd = ad_times + ConfigSystem.GetConfig<CommonModel>().exchangeCD;
InitView();
}
});
// AdRedeemManager.Instance.ShowVideoAd("buy_add_one", () =>
// {
// TimerHelper.mEasy.AddTimer(0.1f, () =>
// {
// var ad_times = Convert.ToInt32(GameHelper.GetNowTime());
// SaveData.GetSaveObject()._watch_ad_cd = ad_times + ConfigSystem.GetConfig<CommonModel>().exchangeCD;
// InitView();
// });
// });
});
}
}
}
else
{
if (SaveData.GetSaveObject().remove_ad_time > GameHelper.GetNowTime())
{
// (item.btn_max_remove as btn_yellow).can_buy.selectedIndex = 1;
ui.panel_parent.panel.btn_max_remove.grayed = true;
ui.panel_parent.panel.btn_max_remove.title = CommonHelper.TimeFormat((int)SaveData.GetSaveObject().remove_ad_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
}
ui.panel_parent.panel.text_removetime.text = "Valid for " + GameHelper.GetCommonModel().RemoveADsPackDuration + " hours";
}
public void SetTextString1()
{
var remove_need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.remove_ad));
var pack_need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.pack_reward));
var myAd = AdRedeemManager.Instance.GetLookRewardADNum();
ui.panel_parent.panel.ads.SetVar("num", myAd.ToString()).FlushVars();
ui.panel_parent.panel.ads1.SetVar("num", myAd.ToString()).FlushVars();
ui.panel_parent.panel.tips1.SetVar("num", pack_need.ToString()).FlushVars();
ui.panel_parent.panel.tips2.SetVar("num", remove_need.ToString()).FlushVars();
}
}
public class PackRewardData
{
public bool isAutoPop;
public bool isNeedScroll;
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2e683256807814283b0ddd73c92ca520
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,73 +0,0 @@
using System.Collections;
using System.Collections.Generic;
namespace ChillConnect
{
public class PackrewardUICtrl : BaseUICtrl
{
private PackrewardUI ui;
private PackrewardModel model;
private uint openUIMsg = UICtrlMsg.PackrewardUI_Open;
private uint closeUIMsg = UICtrlMsg.PackrewardUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.PackrewardModel) as PackrewardModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new PackrewardUI(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: 485f5d5cee496478b8c94d2649adcb49
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: a12350834579110408a9ff5a7f970c5e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,19 +0,0 @@
namespace ChillConnect
{
public class RewardMulNewCtrl : BaseCtrl
{
public static RewardMulNewCtrl Instance { get; private set; }
private RewardMulNewModel model;
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ad6b6ad714766497bab936fd94a74d9e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,13 +0,0 @@
namespace ChillConnect
{
public class RewardMulNewModel : BaseModel
{
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: de45ca22a6e504abca9a1fc7b66af5f1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,204 +0,0 @@
using System;
using DG.Tweening;
using FairyGUI;
using FGUI.bkg_reward_new;
using IgnoreOPS;
using UnityEngine;
namespace ChillConnect
{
public class RewardMulNewUI : BaseUI
{
private RewardMulNewUICtrl ctrl;
private RewardMulNewModel model;
private com_reward_mul ui;
private Action closeCallback;
private GiftData rewardInfo;
bool hasCoin;
decimal m_coinReward;
public RewardMulNewUI(RewardMulNewUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.RewardMulNewUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "bkg_reward_new";
uiInfo.assetName = "com_reward_mul";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
protected override void OnInit()
{
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as com_reward_mul;
}
protected override void OnOpenBefore(object args)
{
rewardInfo = (GiftData)args;
InitView();
}
protected override void OnOpen(object args)
{
}
private void InitView()
{
// AudioManager.Instance.PlayDynamicEffect(AudioConst.reward_show);
ui.node_coin.visible = false;
ui.node_undo.visible = false;
ui.node_move_out.visible = false;
ui.node_refresh.visible = false;
ui.add_undo.visible = false;
ui.add_move_out.visible = false;
ui.add_refresh.visible = false;
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) {
(ui.btn_mul.GetChild("img_saveingpot") as GImage).visible = true;
} else {
(ui.btn_mul.GetChild("img_saveingpot") as GImage).visible = false;
}
for (int i = 0; i < rewardInfo.type.Count; i++) {
if (rewardInfo.type[i] == (int)GiftType.coin) {
hasCoin = true;
ui.node_coin.visible = true;
ui.node_coin.GetChild("lab_num").text = "x" + rewardInfo.reward[i];
} else if (rewardInfo.type[i] == (int)GiftType.undo) {
ui.node_undo.visible = true;
ui.node_undo.GetChild("lab_num").text = "x" + rewardInfo.reward[i];
ui.add_undo.visible = true;
ui.add_undo.GetChild("lab_num").text = "x" + rewardInfo.reward[i];
} else if (rewardInfo.type[i] == (int)GiftType.move_out) {
ui.node_move_out.visible = true;
ui.node_move_out.GetChild("lab_num").text = "x" + rewardInfo.reward[i];
ui.add_move_out.visible = true;
ui.add_move_out.GetChild("lab_num").text = "x" + rewardInfo.reward[i];
} else if (rewardInfo.type[i] == (int)GiftType.refresh) {
ui.node_refresh.visible = true;
ui.node_refresh.GetChild("lab_num").text = "x" + rewardInfo.reward[i];
ui.add_refresh.visible = true;
ui.add_refresh.GetChild("lab_num").text = "x" + rewardInfo.reward[i];
}
}
ui.btn_mul.SetClick(() => {
GameHelper.ShowVideoAd("reward_lobby", isSuccess =>
{
if (isSuccess)
{
GameHelper.ShowTips("Successfully claimed");
getReward(2);
playCoinAni();
ui.ani_group.visible = true;
ui.t0.Play(() => {
ui.ani_group.visible = false;
});
}
});
});
ui.btn_claim.SetClick(() =>
{
ui.btn_claim.SetClick(() => { });
ui.btn_mul.SetClick(() => { });
getReward();
playCoinAni();
DOVirtual.DelayedCall(2f, () =>
{
GameHelper.addInterAdnumber();
});
ui.ani_group.visible = true;
ui.t0.Play(() => {
ui.ani_group.visible = false;
});
});
}
private void getReward(int rate = 1) {
for (int i = 0; i < rewardInfo.type.Count; i++) {
if (rewardInfo.type[i] == (int)GiftType.coin || rewardInfo.type[i] == 101) {
m_coinReward = rewardInfo.reward[i] * rate;
} else if (rewardInfo.type[i] == (int)GiftType.undo) {
int num = GameHelper.GetItemNumber(1) + rewardInfo.reward[i] * rate;
GameHelper.SetItemNumber(1, num);
ui.add_undo.GetChild("lab_num").text = "x" + rewardInfo.reward[i] * rate;
} else if (rewardInfo.type[i] == (int)GiftType.move_out) {
int num = GameHelper.GetItemNumber(0) + rewardInfo.reward[i] * rate;
GameHelper.SetItemNumber(0, num);
ui.add_move_out.GetChild("lab_num").text = "x" + rewardInfo.reward[i] * rate;
} else if (rewardInfo.type[i] == (int)GiftType.refresh) {
int num = GameHelper.GetItemNumber(2) + rewardInfo.reward[i] * rate;
GameHelper.SetItemNumber(2, num);
ui.add_refresh.GetChild("lab_num").text = "x" + rewardInfo.reward[i] * rate;
}
}
}
private bool isget;
private void playCoinAni()
{
if (!hasCoin) {
GameDispatcher.Instance.Dispatch(GameMsg.rewardMul_close);
CtrlCloseUI();
return;
}
if(isget) return;
isget=true;
var rewardData = new RewardData();
int curr_type = 101;
Vector2 end_ = GameHelper.GetUICenterPosition(ui.node_end, true);
var rewardSingleData = new RewardSingleData(curr_type, m_coinReward, RewardOrigin.Play)
{
startPosition = GameHelper.GetUICenterPosition(ui.btn_mul, true),
endPosition = new Vector2(end_.x + 30, end_.y + 30),
};
rewardData.AddReward(rewardSingleData);
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
rewardData.AddCompleted(success =>
{
if (success)
{
DOVirtual.DelayedCall(0.7f, () =>
{
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
GameDispatcher.Instance.Dispatch(GameMsg.rewardMul_close);
CtrlCloseUI();
});
}
});
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4490553e4e1f94f1bba8ad923fbb61c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,72 +0,0 @@
namespace ChillConnect
{
public class RewardMulNewUICtrl : BaseUICtrl
{
private RewardMulNewUI ui;
private RewardMulNewModel model;
private uint openUIMsg = UICtrlMsg.RewardMulNewUI_Open;
private uint closeUIMsg = UICtrlMsg.RewardMulNewUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.RewardMulNewModel) as RewardMulNewModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new RewardMulNewUI(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: 0c90cdcc991c64c09a5c46a37c7ea15d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 35b8dbeae63cb7345a045f2a648b022e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,19 +0,0 @@
namespace ChillConnect
{
public class ThreeDaysGiftCtrl : BaseCtrl
{
public static ThreeDaysGiftCtrl Instance { get; private set; }
private ThreeDaysGiftModel model;
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2c26aef375ac148dc9b4bd8090279823
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,13 +0,0 @@
namespace ChillConnect
{
public class ThreeDaysGiftModel : BaseModel
{
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: c2702ca6f5c254a3cbaffdc3c9a51550
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,514 +0,0 @@
using System;
using System.Collections.Generic;
using DG.Tweening;
using FairyGUI;
using FGUI.Common_01;
using FGUI.threeDaysGift;
using IgnoreOPS;
using SGModule.Net;
using SGModule.NetKit;
using Spine.Unity;
using UnityEngine;
namespace ChillConnect
{
public class ThreeDaysGiftUI : BaseUI
{
private ThreeDaysGiftUICtrl ctrl;
private ThreeDaysGiftModel model;
private com_three_days ui;
public ThreeDaysGiftUI(ThreeDaysGiftUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ThreeDaysGiftUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "threeDaysGift";
uiInfo.assetName = "com_three_days";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
}
protected override void OnClose()
{
HallManager.Instance.UpdateSecondEvent -= InitView;
GameHelper.showGameUI = true;
GameDispatcher.Instance.Dispatch(GameMsg.pack_close);
GameHelper.CallShowTurn();
}
protected override void OnBind()
{
ui = baseUI as com_three_days;
}
private Action closeCallback;
protected override void OnOpenBefore(object args)
{
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.three_days_gift_show, 1);
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.ThreeDaysGiftShow);
list = ConfigSystem.GetConfig<MultigiftModel>().DataList;
ui.btn_close.SetClick(() =>
{
GameDispatcher.Instance.Dispatch(GameMsg.ThreeDaysGiftUIClose);
CtrlCloseUI();
});
ui.groups.visible = false;
var ske_bg = FXManager.Instance.SetFx<SkeletonAnimation>(ui.ani_bg, Fx_Type.fx_three_gift, ref closeCallback);
ske_bg.state.SetAnimation(0, "3_days", false);
ske_bg.state.Complete += a =>
{
ske_bg.state.SetAnimation(0, "3_days_dj", false);
};
DOVirtual.DelayedCall(0.7f, () =>
{
ui.groups.visible = true;
});
// var ske_btn = FXManager.Instance.SetFx<SkeletonAnimation>(ui.ani_title, Fx_Type.fx_title_effect, ref closeCallback);
// ske_btn.state.SetAnimation(0, "animation", true);
InitBroadCast();
InitView();
HallManager.Instance.UpdateSecondEvent += InitView;
if (Screen.safeArea.y != 0)
{
ui.broadcast_top.y += 68;
}
if (GameHelper.IsGiftSwitch())
{
ui.broadcast_top.visible = true;
}
// WebviewManager.Instance.SetDarkThough(false);
}
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.rewardMul_close, rewardMul_close);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
GameDispatcher.Instance.RemoveListener(GameMsg.rewardMul_close, rewardMul_close);
}
#endregion
void pay_success(object str)
{
string type = (string)str;
if (type == PurchasingManager.GetPaySku(PayType.three_days_gift))
{
// var start = Vector2.zero;
// if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day1) {
// start = GameHelper.GetUICenterPosition(ui.day1.item1.lab_num);
// } else if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day2) {
// start = GameHelper.GetUICenterPosition(ui.day2.item1.lab_num);
// } else if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day3) {
// start = GameHelper.GetUICenterPosition(ui.day3.item1.lab_num);
// }
//
// var rewardData = new RewardData();
// var end = GameHelper.GetUICenterPosition(ui.node_end);
//
// var rewardSingleData = new RewardSingleData(101, list[1].coins_quantity, RewardOrigin.AdTask)
// {
// startPosition = start,
// endPosition = end
// };
//
// 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.AdcomingUI_Close);
// SaveData.GetSaveObject().is_get_removead = true;
// InitView();
ui.pay_type.selectedIndex = 2;
}
// GameDispatcher.Instance.Dispatch(GameMsg.noads_refresh);
}
void rewardMul_close(object str)
{
if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day1)
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.ThreeDays1GiftSuccess);
// NetworkKit.BuriedPoint(BuriedPointEvent.Three_days_gift_event, BuriedPointEvent.three_day1_success, 1);
}
else if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day2)
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.ThreeDays2GiftSuccess);
// NetworkKit.BuriedPoint(BuriedPointEvent.Three_days_gift_event, BuriedPointEvent.three_day2_success, 1);
}
else if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day3)
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.ThreeDays3GiftSuccess);
// NetworkKit.BuriedPoint(BuriedPointEvent.Three_days_gift_event, BuriedPointEvent.three_day3_success, 1);
}
SaveData.GetSaveObject().three_gift_got_index++;
SaveData.GetSaveObject().last_got_three_gift_time = GameHelper.GetNowTime();
}
private List<Multigift> list;
private void InitView()
{
int myAdNum = AdRedeemManager.Instance.GetLookRewardADNum();
ui.text_have.text = "Owner ADs:" + myAdNum;
ui.need_text.text = "need " + list[0].Paid_price + " ADs";
ui.btn_buypack.GetChild("img_saveingpot").visible = false;
ui.btn_max_pack.GetChild("img_saveingpot").visible = false;
initItem(0);
initItem(1);
initItem(2);
btn_watchAd btn_buypack = (ui.btn_buypack as btn_watchAd);
GObject pack_title = ui.btn_buypack.GetChild("title");
if (SaveData.GetSaveObject().is_get_ThreeDaysGift)
{
ui.pay_type.selectedIndex = 2;
var isToday = GameHelper.InToday(SaveData.GetSaveObject().last_got_three_gift_time, 0, true);
int three_gift_got_index = SaveData.GetSaveObject().three_gift_got_index;
if (isToday || (three_gift_got_index > (int)rewardState.day3))
{
ui.btn_get.grayed = true;
ui.btn_get.SetClick(() =>
{
if (three_gift_got_index < (int)rewardState.day3)
{
GameHelper.ShowTips("Come back and pick it up tomorrow.");
}
});
}
else
{
ui.btn_get.SetClick(() =>
{
getReward();
ui.btn_get.SetClick(() => { });
});
}
}
else
{
if (!GameHelper.IsAdModelOfPay())
{
ui.pay_type.selectedIndex = 1;
decimal price_pack = (decimal)list[0].Paid_price2;
ui.btn_max_pack.title = GameHelper.getPrice(price_pack);
bool is_get = SaveData.GetSaveObject().is_get_ThreeDaysGift;
if (is_get)
{
ui.btn_max_pack.enabled = false;
ui.btn_max_pack.SetClick(() => { });
}
else
{
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
ui.btn_max_pack.GetChild("img_saveingpot").visible = true;
}
ui.btn_max_pack.SetClick(() =>
{
Debug.Log(price_pack);
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price_pack * 100),
sku = PurchasingManager.GetPaySku(PayType.three_days_gift),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
}
else
{
ui.pay_type.selectedIndex = 0;
bool is_get = SaveData.GetSaveObject().is_get_ThreeDaysGift;
if (is_get)
{
btn_buypack.buy_state.selectedIndex = 0;
btn_buypack.can_buy.selectedIndex = 1;
ui.btn_buypack.grayed = true;
pack_title.text = "Cliamed";
ui.btn_buypack.SetClick(() =>
{
});
}
else if (myAdNum >= list[0].Paid_price)
{
btn_buypack.buy_state.selectedIndex = 1;
btn_buypack.can_buy.selectedIndex = 0;
btn_buypack.SetClick(() =>
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.ThreeDaysGiftBuySuccess);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_AD_event, BuriedPointEvent.three_days_gift_buy_success, 1);
AdRedeemManager.Instance.SetLookRewardADNum(myAdNum - (int)list[0].Paid_price);
GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, PurchasingManager.GetPaySku(PayType.three_days_gift));
//getReward();
ui.btn_buypack.SetClick(() => { });
});
}
else if (SaveData.GetSaveObject()._watch_ad_cd > GameHelper.GetNowTime())
{
btn_buypack.buy_state.selectedIndex = 0;
btn_buypack.can_buy.selectedIndex = 1;
btn_watchAd btn_buy = ui.btn_buypack as btn_watchAd;
btn_buy.btn_text.text = CommonHelper.TimeFormat(SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
btn_buypack.SetClick(() => { });
}
else
{
btn_buypack.buy_state.selectedIndex = 0;
btn_buypack.can_buy.selectedIndex = 0;
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
ui.btn_buypack.GetChild("img_saveingpot").visible = true;
}
btn_buypack.SetClick(() =>
{
GameHelper.ShowVideoAd("ThreeDaysGift", issuccess =>
{
if (issuccess)
{
SaveData.GetSaveObject()._watch_ad_cd = (int)GameHelper.GetNowTime() + GameHelper.GetCommonModel().exchangeCD;
InitView();
}
});
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.ThreeDaysGiftClick);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_AD_event, BuriedPointEvent.three_days_gift_click, 1);
});
}
}
}
BroadCast();
}
private void initItem(int index)
{
com_item day = null;
if (index == 0)
{
day = ui.day1;
}
else if (index == 1)
{
day = ui.day2;
}
else if (index == 2)
{
day = ui.day3;
}
if (SaveData.GetSaveObject().three_gift_got_index - 1 > index)
{
day.img_select.visible = true;
if (SaveData.GetSaveObject().three_gift_got_index - 1 > 2)
{
day.img_select2.visible = true;
}
}
if (index == 2)
{
day.state.selectedIndex = 3;
for (int i = 0; i < 3; i++)
{
item_reward item = day.GetChild("item" + (i + 2)) as item_reward;
item.visible = false;
}
}
else
{
day.state.selectedIndex = list[index].props_quantity.Length;
}
setItemUrl(day.item1.loader_, GiftType.coin);
day.item1.lab_num.text = "x" + list[index].coins_quantity;
for (int i = 0; i < list[index].props_quantity.Length; i++)
{
item_reward item = (day.GetChild("item" + (i + 2)) as item_reward);
setItemUrl(item.loader_, (GiftType)list[index].props_type[i]);
item.visible = true;
item.lab_num.text = "x" + list[index].props_quantity[i];
}
}
private void setItemUrl(GLoader loader, GiftType urltype)
{
if (urltype == GiftType.coin) loader.url = "ui://threeDaysGift/3DAYS_prs_001";
else if (urltype == GiftType.move_out) loader.url = "ui://threeDaysGift/3DAYS_prs_003";
else if (urltype == GiftType.refresh) loader.url = "ui://threeDaysGift/3DAYS_prs_004";
else if (urltype == GiftType.undo) loader.url = "ui://threeDaysGift/3DAYS_prs_002";
}
private void getReward()
{
int index = SaveData.GetSaveObject().three_gift_got_index;
com_item item = null;
if (index == (int)rewardState.day1)
{
item = ui.day1;
}
else if (index == (int)rewardState.day2)
{
item = ui.day2;
}
else if (index == (int)rewardState.day3)
{
item = ui.day3;
}
item.img_select.visible = true;
List<int> types = new List<int>();
List<int> rewards = new List<int>();
types.Add((int)GiftType.coin);
rewards.Add(list[index - 1].coins_quantity);
for (int i = 0; i < list[index - 1].props_quantity.Length; i++)
{
types.Add(list[index - 1].props_type[i]); // GiftType 类型
rewards.Add(list[index - 1].props_quantity[i]);
}
GiftData data = new GiftData();
data.type = types;
data.reward = rewards;
uiCtrlDispatcher.Dispatch(UICtrlMsg.RewardMulNewUI_Open, data);
}
private int broadtime = 0;
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 List<GTextField> text_list = new List<GTextField>();
private void InitBroadCast()
{
text_list.Add((ui.broadcast_top as broadcast_top).item_0.text_1);
text_list.Add((ui.broadcast_top as broadcast_top).item_1.text_1);
text_list.Add((ui.broadcast_top as broadcast_top).item_2.text_1);
for (int i = 0; i < 3; 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=#ff9600][size=42]" + broad_list[i][0] + "[/size][/color] !After purchasing the ThreeDays Bouns,play [color=#ff9600]" + broad_list[i][1] + "[/color] matcher to clear the stage!";
}
}
private void BroadCast()
{
broadtime++;
if (broadtime % 13 == 1)
{
(ui.broadcast_top as broadcast_top).t1.Play(() =>
{
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
string[] array_ = new string[2] { config_name_list[name_index], config_money_list[money_index] };
text_list[0].text = "Congratulations,User [color=#ff9600][size=42]" + array_[0] +
"[/size][/color] !After purchasing the ThreeDays Bouns,play [color=#ff9600]" + array_[1] + "[/color] matcher to clear the stage!";
});
}
else if (broadtime % 13 == 4)
{
(ui.broadcast_top as broadcast_top).t2.Play(() =>
{
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
string[] array_ = new string[2] { config_name_list[name_index], config_money_list[money_index] };
text_list[1].text = "Congratulations,User [color=#ff9600][size=42]" + array_[0] +
"[/size][/color] !After purchasing the ThreeDays Bouns,play [color=#ff9600]" + array_[1] + "[/color] matcher to clear the stage!";
});
}
else if (broadtime % 13 == 7)
{
(ui.broadcast_top as broadcast_top).t3.Play(() =>
{
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
string[] array_ = new string[2] { config_name_list[name_index], config_money_list[money_index] };
text_list[2].text = "Congratulations,User [color=#ff9600][size=42]" + array_[0] +
"[/size][/color] !After purchasing the ThreeDays Bouns,play [color=#ff9600]" + array_[1] + "[/color] matcher to clear the stage!";
});
}
}
}
}
enum rewardState
{
day1 = 1,
day2,
day3
}
public class GiftData
{
public List<int> type;
public List<int> reward;
public string uiName;
}
public enum GiftType
{
coin = 101,
move_out = 0,
undo = 1,
refresh = 2,
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 34e42e54a15e74f5fa6f4738876e5946
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,72 +0,0 @@
namespace ChillConnect
{
public class ThreeDaysGiftUICtrl : BaseUICtrl
{
private ThreeDaysGiftUI ui;
private ThreeDaysGiftModel model;
private uint openUIMsg = UICtrlMsg.ThreeDaysGiftUI_Open;
private uint closeUIMsg = UICtrlMsg.ThreeDaysGiftUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.ThreeDaysGiftModel) as ThreeDaysGiftModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ThreeDaysGiftUI(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: 9a66b1a98eeb44e23940d70809964ad8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: a52244fcb0d17ec47bc599e792de7abc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,41 +0,0 @@
namespace ChillConnect
{
public class WheelViewCtrl : BaseCtrl
{
public static WheelViewCtrl Instance { get; private set; }
private WheelViewModel model;
#region
protected override void OnInit()
{
Instance = this;
}
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: 4fcd41e0110dca543936cdcd3ea1c51e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,38 +0,0 @@
using IgnoreOPS;
namespace ChillConnect
{
public class WheelViewModel : BaseModel
{
public string NextOpenWheelTimeStr
{
get
{
var val = (int)(DataMgr.NextOpenWheelStampTime.Value - GameHelper.GetNowTime());
if (val > 0) return CommonHelper.FormatTime(val, CountDownType.Hour);
return "00:00:00";
}
}
#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: 635967f500a9fb94cab3762e18574c38
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,363 +0,0 @@
// using FGUI.A000_common;
using System;
using System.Collections.Generic;
using DG.Tweening;
using FairyGUI;
using FGUI.Common_01;
using FGUI.Turntable_11;
using IgnoreOPS;
using SGModule.Common.Extensions;
using Spine.Unity;
using UnityEngine;
namespace ChillConnect
{
public class WheelViewUI : BaseUI
{
private WheelViewUICtrl ctrl;
private WheelViewModel model;
private readonly int[] vidieWeight = new int[8];
private TurntableModel turntableData;
private List<com_coin> ItemList = new();
private bool isClickSpin;
private bool isClickAbleWatchAD = true;
private SkeletonAnimation normalAnim;
// private SkeletonAnimation turnAnim;
// private SkeletonAnimation awardAnim;
private Action closeCallback;
private FGUI.Turntable_11.com_wheel ui;
public WheelViewUI(WheelViewUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.WheelViewUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Turntable_11";
uiInfo.assetName = "com_wheel";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
model = moduleManager.GetModel(ModelConst.WheelViewModel) as WheelViewModel;
}
protected override void OnClose()
{
HallManager.Instance.UpdateSecondEvent -= UpdateTime;
GameHelper.showGameUI = true;
}
protected override void OnBind()
{
ui = baseUI as FGUI.Turntable_11.com_wheel;
}
protected override void OnOpenBefore(object args)
{
LoadLastCheckDate();
CheckNewDay();
var disc = ui.disc;
ItemList.Add(disc.award1);
ItemList.Add(disc.award2);
ItemList.Add(disc.award3);
ItemList.Add(disc.award4);
ItemList.Add(disc.award5);
ItemList.Add(disc.award6);
ItemList.Add(disc.award7);
ItemList.Add(disc.award8);
HallManager.Instance.UpdateSecondEvent += UpdateTime;
turntableData = ConfigSystem.GetConfig<TurntableModel>();
normalAnim = FXManager.Instance.SetFx<SkeletonAnimation>(ui.light_parent, Fx_Type.fx_wheel, ref closeCallback);
UpdateTime();
refreshData();
InitView();
}
private DateTime _lastCheckDate;
private const string PlayerPrefsKeyLastCheckDate = "Wheel_new_days";
private void LoadLastCheckDate()
{
string lastCheckDateString = PlayerPrefs.GetString(PlayerPrefsKeyLastCheckDate, "");
if (!string.IsNullOrEmpty(lastCheckDateString))
{
_lastCheckDate = DateTime.ParseExact(lastCheckDateString, "yyyy-MM-dd", null);
}
else
{
// 如果没有找到日期,初始化为今天的日期
_lastCheckDate = DateTime.Today;
SaveLastCheckDate();
}
}
private void SaveLastCheckDate()
{
// 将日期转换为字符串并存储到PlayerPrefs
PlayerPrefs.SetString(PlayerPrefsKeyLastCheckDate, _lastCheckDate.ToString("yyyy-MM-dd"));
PlayerPrefs.Save();
}
private void CheckNewDay()
{
DateTime currentDate = DateTime.Today;
// 如果当前日期与上次检查的日期不同,说明是新的一天
if (_lastCheckDate != currentDate)
{
// 重置 ThisDayWatchSlyderVideoNum
DataMgr.ThisDayWatchSlyderVideoNum.Value = 0;
// 更新最后检查的日期并保存到PlayerPrefs
_lastCheckDate = currentDate;
SaveLastCheckDate();
}
}
//初始化页面逻辑
private void InitView()
{
normalAnim.state.SetAnimation(0, "daiji", true);
for (var i = 0; i < ItemList.Count; i++)
{
vidieWeight[i] = turntableData.DataList[i].weight;
}
ui.disc.rotation = 0;
ui.btn_spin.SetClick(SpineAnim);
ui.close.SetClick(() =>
{
CtrlCloseUI();
});
}
private void refreshData()
{
for (int i = 0; i < ItemList.Count; i++)
{
var item = ItemList[i];
var turntable = turntableData.DataList[i];
var id = turntable.wheel_item;
var quantity = turntable.quantity;
if (!GameHelper.IsGiftSwitch() && id == 102)
{
id = 101;
quantity *= 10;
}
item.text_num.text = id == 102 ? GameHelper.Get102Str((decimal)quantity) : GameHelper.Get101Str((decimal)quantity);
Debug.Log($"wheel id=========={id}");
item.status.selectedIndex = id == 102 ? com_coin.Status_b : com_coin.Status_a;
}
var times = DataMgr.ThisDayWatchSlyderVideoNum.Value;
var limits = GameHelper.GetCommonModel().wheelTimes[0];
// ui.spin.text_spintimes.SetVar("times", times.ToString()).FlushVars();
// ui.spin.text_spintimes.SetVar("limits", limits.ToString()).FlushVars();
ui.text_spintimes.SetVar("times", times.ToString()).FlushVars();
ui.text_spintimes.SetVar("limits", limits.ToString()).FlushVars();
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
private Tween ResultTween;
private float turnTime = 7.0f;
private void SpineAnim()
{
if (isClickSpin)
return;
if (GameHelper.GetNowTime() < DataMgr.NextOpenWheelStampTime.Value) return;
if (isClickAbleWatchAD)
{
isClickAbleWatchAD = false;
GameHelper.ShowVideoAd("reward_luckySpin", isSuccess =>
{
if (isSuccess)
{
Spin();
}
isClickAbleWatchAD = true;
});
}
}
private void Spin()
{
// normalAnim.SetActive(false);
ui.disc.rotation = 0;
normalAnim.state.SetAnimation(0, "zhuandong", true);
isClickSpin = true;
ui.close.touchable = false;
ui.close.grayed = false;
ui.btn_spin.touchable = false;
var index = CommonHelper.GetIndexByChanceList(vidieWeight);
var data = turntableData.DataList[index];
var angle = 3600 - (data.Seq - 1) * 45;
AudioManager.Instance.PlayDynamicEffect(AudioConst.wheel_spin);
DOTween.To(() => ui.disc.rotation, e => ui.disc.rotation = e, angle, turnTime)
.SetEase(Ease.OutQuad);
ResultTween = DOVirtual.DelayedCall(turnTime, () => ReceivePlane(data));
}
private void ReceivePlane(Turntable vo)
{
normalAnim.state.SetAnimation(0, "zhongjiang", true);
DOVirtual.DelayedCall(1.5f, () =>
{
isClickSpin = false;
ResultTween = null;
ui.close.touchable = true;
ui.close.grayed = false;
ui.btn_spin.cont_spin.selectedIndex = 1;
ui.btn_spin.cont_state.selectedIndex = 1;
var id = vo.wheel_item;
var quantity = vo.quantity;
if (!GameHelper.IsGiftSwitch() && id == 102)
{
id = 101;
quantity *= 10;
}
// if (id == 0)
// {
var endui = id == 101 ? ui.point : ui.point1;
var startPoint = GameHelper.GetUICenterPosition(ui.startpoint);
var endPoint = GameHelper.GetUICenterPosition(endui);
var rewardData = new RewardData();
var rewardSingleData = new RewardSingleData(id, (decimal)quantity, RewardOrigin.LuckyWheel)
{
startPosition = startPoint,
endPosition = new Vector2(endPoint.x - 150, endPoint.y - 136),
};
rewardData.AddReward(rewardSingleData);
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.Dialog |
RewardDisplayType.ValueChange;
rewardData.AddCompleted((isScu) =>
{
normalAnim.state.SetAnimation(0, "daiji", true);
});
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
// }
// else
// {
// GameHelper.AddItemNumber(id - 1, (int)quantity);
// GameHelper.ShowTips("Successfully received");
// }
DataMgr.NextOpenWheelStampTime.Value =
GameHelper.GetNowTime() + GameHelper.GetCommonModel().wheelTimes[1];
DataMgr.ThisDayWatchSlyderVideoNum.Value = DataMgr.ThisDayWatchSlyderVideoNum.Value + 1;
UpdateTime();
refreshData();
});
}
private void UpdateTime()
{
if (DataMgr.ThisDayWatchSlyderVideoNum.Value >= GameHelper.GetCommonModel().wheelTimes[0])
{
DateTime currentTime = DateTime.Now;
ui.btn_spin.cont_state.selectedIndex = 2;
ui.btn_spin.touchable = false;
ui.btn_spin.enabled = false;
ui.btn_spin.cont_spin.selectedIndex = 1;
}
else
{
if (GameHelper.GetNowTime() >= DataMgr.NextOpenWheelStampTime.Value)
{
ui.btn_spin.touchable = true;
ui.btn_spin.enabled = true;
ui.btn_spin.cont_spin.selectedIndex = 0;
ui.btn_spin.cont_state.selectedIndex = 0;
}
else
{
ui.btn_spin.touchable = false;
ui.btn_spin.enabled = false;
ui.btn_spin.cont_spin.selectedIndex = 1;
ui.btn_spin.cont_state.selectedIndex = 1;
}
ui.btn_spin.text_time.text = model.NextOpenWheelTimeStr;
}
}
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1655b3ae9b24ea54c928b9705980bdc8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,85 +0,0 @@
namespace ChillConnect
{
public class WheelViewUICtrl : BaseUICtrl
{
private readonly uint closeUIMsg = UICtrlMsg.WheelUI_Close;
private WheelViewModel model;
private readonly uint openUIMsg = UICtrlMsg.WheelUI_Open;
private WheelViewUI ui;
private void OnSignInUI_Display(object obj)
{
if (obj != null)
{
var isShow = (bool)obj;
if (isShow)
ui?.Display();
else
ui?.Hide();
}
}
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new WheelViewUI(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: 753bb6798e3c56348ade900ff4651ac7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: