diff --git a/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs b/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs index f8d9727..16e68d5 100644 --- a/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs +++ b/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs @@ -19,7 +19,6 @@ namespace FGUI.JMain public GButton btn_admin; public btn_question btn_question; public GButton btn_saveingpot; - public GButton btn_cashout; public btn_petty btn_petty; public GButton btn_play; public GButton btn_wb; @@ -46,10 +45,9 @@ namespace FGUI.JMain btn_admin = (GButton)GetChildAt(12); btn_question = (btn_question)GetChildAt(13); btn_saveingpot = (GButton)GetChildAt(14); - btn_cashout = (GButton)GetChildAt(15); - btn_petty = (btn_petty)GetChildAt(16); - btn_play = (GButton)GetChildAt(17); - btn_wb = (GButton)GetChildAt(18); + btn_petty = (btn_petty)GetChildAt(15); + btn_play = (GButton)GetChildAt(16); + btn_wb = (GButton)GetChildAt(17); } } } \ No newline at end of file diff --git a/Assets/BingoBrain/FGUI/Package/JMall/JMallBinder.cs b/Assets/BingoBrain/FGUI/Package/JMall/JMallBinder.cs index 8844f44..72a9df0 100644 --- a/Assets/BingoBrain/FGUI/Package/JMall/JMallBinder.cs +++ b/Assets/BingoBrain/FGUI/Package/JMall/JMallBinder.cs @@ -8,6 +8,9 @@ namespace FGUI.JMall { public static void BindAll() { + UIObjectFactory.SetPackageItemExtension(com_exchange.URL, typeof(com_exchange)); + UIObjectFactory.SetPackageItemExtension(btn_setnum.URL, typeof(btn_setnum)); + UIObjectFactory.SetPackageItemExtension(com_makeup.URL, typeof(com_makeup)); UIObjectFactory.SetPackageItemExtension(com_mall.URL, typeof(com_mall)); UIObjectFactory.SetPackageItemExtension(com_mall_carditem.URL, typeof(com_mall_carditem)); UIObjectFactory.SetPackageItemExtension(com_mall_coinitem.URL, typeof(com_mall_coinitem)); diff --git a/Assets/BingoBrain/FGUI/Package/JMall/btn_setnum.cs b/Assets/BingoBrain/FGUI/Package/JMall/btn_setnum.cs new file mode 100644 index 0000000..15a2d1f --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/JMall/btn_setnum.cs @@ -0,0 +1,25 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; +using FairyGUI.Utils; + +namespace FGUI.JMall +{ + public partial class btn_setnum : GButton + { + public Controller type; + public const string URL = "ui://wj1zvor9pf31x"; + + public static btn_setnum CreateInstance() + { + return (btn_setnum)UIPackage.CreateObject("JMall", "btn_setnum"); + } + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + type = GetControllerAt(0); + } + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/FGUI/Package/JMall/btn_setnum.cs.meta b/Assets/BingoBrain/FGUI/Package/JMall/btn_setnum.cs.meta new file mode 100644 index 0000000..8b518d6 --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/JMall/btn_setnum.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9958109f48115094cbea8bc607a89f41 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/FGUI/Package/JMall/com_exchange.cs b/Assets/BingoBrain/FGUI/Package/JMall/com_exchange.cs new file mode 100644 index 0000000..fdfa86f --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/JMall/com_exchange.cs @@ -0,0 +1,47 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; +using FairyGUI.Utils; + +namespace FGUI.JMall +{ + public partial class com_exchange : GComponent + { + public btn_setnum btn_subcard; + public btn_setnum btn_addcard; + public GTextField text_card_num; + public btn_redeem_coin btn_exchange_card; + public btn_setnum btn_subamazon; + public btn_setnum btn_addamazon; + public GTextField text_amazon_num; + public btn_redeem_coin btn_exchange_amazon; + public GTextField text_amazon_ch; + public com_makeup com_makeup0; + public com_makeup com_makeup1; + public com_makeup com_makeup2; + public const string URL = "ui://wj1zvor9pf31j"; + + public static com_exchange CreateInstance() + { + return (com_exchange)UIPackage.CreateObject("JMall", "com_exchange"); + } + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + btn_subcard = (btn_setnum)GetChildAt(5); + btn_addcard = (btn_setnum)GetChildAt(6); + text_card_num = (GTextField)GetChildAt(7); + btn_exchange_card = (btn_redeem_coin)GetChildAt(8); + btn_subamazon = (btn_setnum)GetChildAt(10); + btn_addamazon = (btn_setnum)GetChildAt(11); + text_amazon_num = (GTextField)GetChildAt(12); + btn_exchange_amazon = (btn_redeem_coin)GetChildAt(13); + text_amazon_ch = (GTextField)GetChildAt(16); + com_makeup0 = (com_makeup)GetChildAt(17); + com_makeup1 = (com_makeup)GetChildAt(18); + com_makeup2 = (com_makeup)GetChildAt(19); + } + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/FGUI/Package/JMall/com_exchange.cs.meta b/Assets/BingoBrain/FGUI/Package/JMall/com_exchange.cs.meta new file mode 100644 index 0000000..0f028f0 --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/JMall/com_exchange.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0bea775c9acff6a4b92f889ef597d4fc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/FGUI/Package/JMall/com_makeup.cs b/Assets/BingoBrain/FGUI/Package/JMall/com_makeup.cs new file mode 100644 index 0000000..96faf1d --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/JMall/com_makeup.cs @@ -0,0 +1,31 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; +using FairyGUI.Utils; + +namespace FGUI.JMall +{ + public partial class com_makeup : GComponent + { + public GProgressBar progress_makeup; + public GTextField text_progress; + public GButton btn_makeup; + public GRichTextField text_makeup; + public const string URL = "ui://wj1zvor9pf31z"; + + public static com_makeup CreateInstance() + { + return (com_makeup)UIPackage.CreateObject("JMall", "com_makeup"); + } + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + progress_makeup = (GProgressBar)GetChildAt(2); + text_progress = (GTextField)GetChildAt(3); + btn_makeup = (GButton)GetChildAt(4); + text_makeup = (GRichTextField)GetChildAt(5); + } + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/FGUI/Package/JMall/com_makeup.cs.meta b/Assets/BingoBrain/FGUI/Package/JMall/com_makeup.cs.meta new file mode 100644 index 0000000..68af705 --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/JMall/com_makeup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1eb56f50fb28fea4d98304d7821b072a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/Harmony/GameHelper.cs b/Assets/BingoBrain/Harmony/GameHelper.cs index 7ec2600..53e3e6a 100644 --- a/Assets/BingoBrain/Harmony/GameHelper.cs +++ b/Assets/BingoBrain/Harmony/GameHelper.cs @@ -1658,7 +1658,7 @@ namespace BingoBrain } public static bool isRDExchangeMode() { - return true;//zhushi + // return false;//zhushi return SaveData.GetSaveobject().ExchangeModeToggle == 1; } public static string getDesByKey(string key) diff --git a/Assets/BingoBrain/Model/Config/Game/CommonModel.cs b/Assets/BingoBrain/Model/Config/Game/CommonModel.cs index ca83279..fec6a71 100644 --- a/Assets/BingoBrain/Model/Config/Game/CommonModel.cs +++ b/Assets/BingoBrain/Model/Config/Game/CommonModel.cs @@ -97,5 +97,9 @@ namespace BingoBrain //小额奖励 public int SmallReward; public int ProcessingTime; + + public int ExchangeCard; + public int[] ExchangeAmazon; + } } diff --git a/Assets/BingoBrain/Model/Info/SkinInfot.cs b/Assets/BingoBrain/Model/Info/SkinInfot.cs index 1e36e3e..082a2aa 100644 --- a/Assets/BingoBrain/Model/Info/SkinInfot.cs +++ b/Assets/BingoBrain/Model/Info/SkinInfot.cs @@ -134,6 +134,8 @@ namespace BingoBrain public static uint PettyAwardUI_Open = ++cursor_OpenClose; public static uint PettyAwardUI_Close = ++cursor_OpenClose; + public static uint ExchangeUI_Open = ++cursor_OpenClose; + public static uint ExchangeUI_Close = ++cursor_OpenClose; } public static partial class UICtrlMsg { diff --git a/Assets/BingoBrain/ModuleBoard/CtrlConst.cs b/Assets/BingoBrain/ModuleBoard/CtrlConst.cs index d7d5c43..ba6713f 100644 --- a/Assets/BingoBrain/ModuleBoard/CtrlConst.cs +++ b/Assets/BingoBrain/ModuleBoard/CtrlConst.cs @@ -65,5 +65,6 @@ namespace BingoBrain public const string ThreeDaysGiftCtrl = "ThreeDaysGiftCtrl"; public const string RewardMulNewCtrl = "RewardMulNewCtrl"; public const string PettyAwardCtrl = "PettyAwardCtrl"; + public const string ExchangeCtrl = "ExchangeCtrl"; } } \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleBoard/ModelConst.cs b/Assets/BingoBrain/ModuleBoard/ModelConst.cs index d16f237..5ec2ea6 100644 --- a/Assets/BingoBrain/ModuleBoard/ModelConst.cs +++ b/Assets/BingoBrain/ModuleBoard/ModelConst.cs @@ -53,5 +53,6 @@ namespace BingoBrain public const string ThreeDaysGiftModel = "ThreeDaysGiftModel"; public const string RewardMulNewModel = "RewardMulNewModel"; public const string PettyAwardModel = "PettyAwardModel"; + public const string ExchangeModel = "ExchangeModel"; } } \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleBoard/ModuleBoard.cs b/Assets/BingoBrain/ModuleBoard/ModuleBoard.cs index a8828c6..9e6de9c 100644 --- a/Assets/BingoBrain/ModuleBoard/ModuleBoard.cs +++ b/Assets/BingoBrain/ModuleBoard/ModuleBoard.cs @@ -48,6 +48,7 @@ namespace BingoBrain moduleBoardk.AddModel(ModelConst.FirstRewardModel, new FirstRewardModel()); moduleBoardk.AddModel(ModelConst.PettyAwardModel, new PettyAwardModel()); moduleBoardk.AddModel(ModelConst.H5Model, new H5Model()); + moduleBoardk.AddModel(ModelConst.ExchangeModel, new ExchangeModel()); } public static void AutoRegisterUIType() @@ -93,6 +94,7 @@ namespace BingoBrain moduleBoardk.AddUIType(UIConst.FirstRewardUI, typeof(FirstRewardUI)); moduleBoardk.AddUIType(UIConst.PettyAwardUI, typeof(PettyAwardUI)); moduleBoardk.AddUIType(UIConst.H5UI, typeof(H5UI)); + moduleBoardk.AddUIType(UIConst.ExchangeUI, typeof(ExchangeUI)); } public static void AutoRegisterCtrl() @@ -139,6 +141,7 @@ namespace BingoBrain moduleBoardk.AddCtrl(CtrlConst.FirstRewardCtrl, new FirstRewardCtrl()); moduleBoardk.AddCtrl(CtrlConst.PettyAwardCtrl, new PettyAwardCtrl()); moduleBoardk.AddCtrl(CtrlConst.H5Ctrl, new H5Ctrl()); + moduleBoardk.AddCtrl(CtrlConst.ExchangeCtrl, new ExchangeCtrl()); } public static void AutoRegisterUICtrl() @@ -185,6 +188,7 @@ namespace BingoBrain moduleBoardk.AddUICtrl(UICtrlConst.FirstRewardUICtrl, new FirstRewardUICtrl()); moduleBoardk.AddUICtrl(UICtrlConst.PettyAwardUICtrl, new PettyAwardUICtrl()); moduleBoardk.AddUICtrl(UICtrlConst.H5UICtrl, new H5UICtrl()); + moduleBoardk.AddUICtrl(UICtrlConst.ExchangeUICtrl, new ExchangeUICtrl()); } } } \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleBoard/UIConst.cs b/Assets/BingoBrain/ModuleBoard/UIConst.cs index 1cace1d..e7fd118 100644 --- a/Assets/BingoBrain/ModuleBoard/UIConst.cs +++ b/Assets/BingoBrain/ModuleBoard/UIConst.cs @@ -103,5 +103,6 @@ namespace BingoBrain public const string ThreeDaysGiftUI = "ThreeDaysGiftUI"; public const string RewardMulNewUI = "RewardMulNewUI"; public const string PettyAwardUI = "PettyAwardUI"; + public const string ExchangeUI = "ExchangeUI"; } } \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleBoard/UICtrlConst.cs b/Assets/BingoBrain/ModuleBoard/UICtrlConst.cs index 2a989f7..6a86603 100644 --- a/Assets/BingoBrain/ModuleBoard/UICtrlConst.cs +++ b/Assets/BingoBrain/ModuleBoard/UICtrlConst.cs @@ -66,5 +66,6 @@ namespace BingoBrain public const string RewardMulNewUICtrl = "RewardMulNewUICtrl"; public const string MakeupConfirmUICtrl = "MakeupConfirmUICtrl"; public const string PettyAwardUICtrl = "PettyAwardUICtrl"; + public const string ExchangeUICtrl = "ExchangeUICtrl"; } } \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs b/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs index eda7bc6..936b7d2 100644 --- a/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs +++ b/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs @@ -173,18 +173,18 @@ namespace BingoBrain { UICtrlDispatcher.Instance.Dispatch(SkinInfo.FaqUIUI_Open); }); - ui.btn_cashout.SetClick(() => - { - var makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last(); - var vo = ConfigSystem.GetConfig().GetData(makeupTaskData.tableId); - //DataMgr.Ticket.Value=99999; - //makeupTaskData.videoCount = 50; - if (vo == null) - { - return; - } - UICtrlDispatcher.Instance.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData); - }); + // ui.btn_cashout.SetClick(() => + // { + // var makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last(); + // var vo = ConfigSystem.GetConfig().GetData(makeupTaskData.tableId); + // //DataMgr.Ticket.Value=99999; + // //makeupTaskData.videoCount = 50; + // if (vo == null) + // { + // return; + // } + // UICtrlDispatcher.Instance.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData); + // }); ui.btn_saveingpot.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(SkinInfo.SaveingPotUI_Open); diff --git a/Assets/BingoBrain/ModuleUI/BingoHalld/BingoHalldUI.cs b/Assets/BingoBrain/ModuleUI/BingoHalld/BingoHalldUI.cs index b56b586..d468a59 100644 --- a/Assets/BingoBrain/ModuleUI/BingoHalld/BingoHalldUI.cs +++ b/Assets/BingoBrain/ModuleUI/BingoHalld/BingoHalldUI.cs @@ -156,7 +156,7 @@ namespace BingoBrain private void OnClickTab(int tabIndex) { - UICtrlDispatcher.Instance.Dispatch(tabIndex == 1 ? SkinInfo.JMallUI_Open : SkinInfo.JMallUI_Close); + UICtrlDispatcher.Instance.Dispatch(tabIndex == 1 ? SkinInfo.ExchangeUI_Open : SkinInfo.ExchangeUI_Close); UICtrlDispatcher.Instance.Dispatch(tabIndex == 0 ? SkinInfo.BingoHallUI_Open : SkinInfo.BingoHallUI_Close); UICtrlDispatcher.Instance.Dispatch(tabIndex == 2 ? SkinInfo.BasptUI_Open : SkinInfo.BasptUI_Close); UICtrlDispatcher.Instance.Dispatch(tabIndex == 3 ? SkinInfo.H5UI_Open : SkinInfo.H5UI_Close); diff --git a/Assets/BingoBrain/ModuleUI/Exchange.meta b/Assets/BingoBrain/ModuleUI/Exchange.meta new file mode 100644 index 0000000..66a4098 --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/Exchange.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 24463a734e9e90041a72068f560febbe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/ModuleUI/Exchange/ExchangeCtrl.cs b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeCtrl.cs new file mode 100644 index 0000000..64e9e43 --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeCtrl.cs @@ -0,0 +1,25 @@ +using BingoBrain.Core; + +namespace BingoBrain +{ + public class ExchangeCtrl : BaseCtrl + { + public static ExchangeCtrl Instance { get; private set; } + + private ExchangeModel model; + + #region 生命周期 + protected override void OnInit() + { + Instance = this; + //model = ModuleManager.Instance..GetModel(ModelConst.ExchangeModel) as ExchangeModel; + } + + protected override void OnDispose() + { + Instance = null; + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/Exchange/ExchangeCtrl.cs.meta b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeCtrl.cs.meta new file mode 100644 index 0000000..58bcb6f --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeCtrl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f1c865d74050b0429513765f7b0f27b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/ModuleUI/Exchange/ExchangeModel.cs b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeModel.cs new file mode 100644 index 0000000..a5d7a95 --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeModel.cs @@ -0,0 +1,23 @@ +using BingoBrain.Core; + +namespace BingoBrain +{ + public class ExchangeModel : BaseModel + { + #region 生命周期 + + protected override void OnInit() + { + } + + protected override void OnDispose() + { + } + + protected override void OnReset() + { + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/Exchange/ExchangeModel.cs.meta b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeModel.cs.meta new file mode 100644 index 0000000..50c1b5a --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeModel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f93991df42069f04ab87cf541b5b184a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUI.cs b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUI.cs new file mode 100644 index 0000000..e19c558 --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUI.cs @@ -0,0 +1,280 @@ +using System.Collections.Generic; +using System.Text; +using BingoBrain.Core; +using BingoBrain.HotFix; +using FGUI.ACommon; +using FGUI.JMall; +using Newtonsoft.Json; +using UnityEngine; + +namespace BingoBrain +{ + public class ExchangeUI : BaseUI + { + private ExchangeUICtrl ctrl; + private ExchangeModel model; + private FGUI.JMall.com_exchange ui; + + public ExchangeUI(ExchangeUICtrl ctrl) : base(ctrl) + { + uiName = UIConst.ExchangeUI; + this.ctrl = ctrl; + } + + protected override void SetUIInfo(UIInfo uiInfo) + { + uiInfo.packageName = "JMall"; + uiInfo.assetName = "com_exchange"; + uiInfo.layerType = UILayerType.Normal; + uiInfo.isNeedOpenAnim = false; + uiInfo.isNeedCloseAnim = false; + uiInfo.isNeedUIMask = true; + } + + #region 生命周期 + protected override void OnInit() + { + //model = ModuleManager.Instance.GetModel(ModelConst.ExchangeModel) as ExchangeModel; + } + + protected override void OnClose() + { + } + + protected override void OnBind() + { + ui = baseUI as FGUI.JMall.com_exchange; + } + + 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 int card_buy_num = 1; + private int amazon_buy_num = 1; + + //初始化页面逻辑 + private void InitView() + { + Debug.Log(GameHelper.GetCommonModel().ExchangeCard); + Debug.Log(GameHelper.GetCommonModel().ExchangeAmazon); + ui.text_amazon_ch.text =(GameHelper.isRDExchangeMode() ? "": "$") + GameHelper.GetCommonModel().ExchangeAmazon[0].ToString(); + SetGold(); + ui.btn_addcard.SetClick(() => + { + if (card_buy_num >= 10) return; + card_buy_num++; + SetGold(); + }); + ui.btn_subcard.SetClick(() => + { + if (card_buy_num <= 1) return; + card_buy_num--; + SetGold(); + }); + + ui.btn_addamazon.SetClick(() => + { + if (amazon_buy_num >= 10) return; + amazon_buy_num++; + SetGold(); + }); + ui.btn_subamazon.SetClick(() => + { + if (amazon_buy_num <= 1) return; + amazon_buy_num--; + SetGold(); + }); + + ui.btn_exchange_card.SetClick(() => + { + if (card_buy_num * GameHelper.GetCommonModel().ExchangeCard < PreferencesMgr.Instance.Currency101) + { + PreferencesMgr.Instance.CardBoardSum = PreferencesMgr.Instance.CardBoardSum + card_buy_num; + PreferencesMgr.Instance.Currency101 = PreferencesMgr.Instance.Currency101 - card_buy_num * GameHelper.GetCommonModel().ExchangeCard; + GameHelper.ShowTips("Exchange successful"); + + } + else + { + GameHelper.ShowTips("There aren't enough gold"); + } + }); + + ui.btn_exchange_amazon.SetClick(() => + { + if (amazon_buy_num * GameHelper.GetCommonModel().ExchangeAmazon[1] < PreferencesMgr.Instance.Currency101) + { + SaveingPotHelper.TestingClearTime(); + SaveData.GetSaveobject().saveingpot_ch = SaveData.GetSaveobject().saveingpot_ch + amazon_buy_num * GameHelper.GetCommonModel().ExchangeAmazon[0]; + PreferencesMgr.Instance.Currency101 = PreferencesMgr.Instance.Currency101 - amazon_buy_num * GameHelper.GetCommonModel().ExchangeAmazon[1]; + GameHelper.ShowTips("Exchange successful"); + } + else + { + GameHelper.ShowTips("There aren't enough gold"); + } + }); + SetMakeup(); + } + + private void SetGold() + { + ui.text_card_num.text = card_buy_num.ToString(); + ui.text_amazon_num.text = amazon_buy_num.ToString(); + ui.btn_exchange_card.title = (card_buy_num * GameHelper.GetCommonModel().ExchangeCard).ToString(); + ui.btn_exchange_amazon.title = (amazon_buy_num * GameHelper.GetCommonModel().ExchangeAmazon[1]).ToString(); + } + + private void SetMakeup() + { + + List btn_list = new List() { ui.com_makeup0, ui.com_makeup1, ui.com_makeup2 }; + + List makeup_list = ConfigSystem.GetConfig().dataList; + Debug.Log(JsonConvert.SerializeObject(PreferencesMgr.Instance.MakeupTaskHistory)); + for (int i = 0; i < btn_list.Count; i++) + { + MakeupTaskData makeupTaskData = null; + for (int j = PreferencesMgr.Instance.MakeupTaskHistory.Count - 1; j >= 0; j--) + { + if (PreferencesMgr.Instance.MakeupTaskHistory[j].tableId == (i + 1)) + { + makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory[j]; + // now_selectindex = index; + break; + } + } + if (makeupTaskData == null) + { + makeup makeupVo = makeup_list[i]; + + makeupTaskData = new MakeupTaskData(); + makeupTaskData.tableId = i + 1; + makeupTaskData.id = PreferencesMgr.Instance.MakeupTaskHistory.Count + 1; + makeupTaskData.amountStr = $"{makeupVo.item_need}"; + makeupTaskData.amount = makeupVo.item_need; + makeupTaskData.orderID = GetRandomNum(8); + makeupTaskData.SetStatus(MakeupTaskStatus.None); + PreferencesMgr.Instance.MakeupTaskHistory.Add(makeupTaskData); + PreferencesMgr.Instance.SaveMakeupTaskHistory(); + + } + + btn_list[i].btn_makeup.SetClick(() => + { + UICtrlDispatcher.Instance.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData); + }); + btn_list[i].text_makeup.text = (GameHelper.isRDExchangeMode() ? "" : "") + + GameHelper.Get102Str_new((decimal)makeupTaskData.amount); + if (makeupTaskData.status > MakeupTaskStatus.None) + { + btn_list[i].text_progress.text = $"{makeupTaskData.amount:N}" + "/" + $"{makeupTaskData.amount:N}"; + btn_list[i].progress_makeup.value=100; + } + else + { + btn_list[i].text_progress.text = $"{PreferencesMgr.Instance.Currency102:N}" + "/" + $"{makeupTaskData.amount:N}"; + btn_list[i].progress_makeup.value=(double)(PreferencesMgr.Instance.Currency102/makeupTaskData.amount); + } + + + + } + // List btn_list = new List() { ui.com_chlevel.btn_0, ui.com_chlevel.btn_1, ui.com_chlevel.btn_2 }; + + // List makeup_list = ConfigSystem.GetConfig().dataList; + // now_selectindex = makeupTaskData.tableId - 1; + // for (int i = 0; i < btn_list.Count; i++) + // { + // btn_list[i].text_level0.text = "Level " + makeup_list[i].levels_need; + // btn_list[i].text_level1.text = "Level " + makeup_list[i].levels_need; + // btn_list[i].text_level2.text = "Level " + makeup_list[i].levels_need; + // if (i < ch_index) + // { + // btn_list[i].img_check.visible = true; + // // btn_list[i].text_level0.y = 4; + // // btn_list[i].text_level1.y = 4; + + // } + // else + // { + // btn_list[i].img_check.visible = false; + // // btn_list[i].text_level0.y = 38; + // // btn_list[i].text_level1.y = 38; + // } + + // if (i == now_selectindex) + // { + // btn_list[i].btn_state.selectedIndex = 1; + // } + // else if (i > ch_index) + // { + // btn_list[i].btn_state.selectedIndex = 2; + // int _temp_index = i; + // btn_list[i].SetClick(() => + // { + // GameHelper.ShowTips("Complete level " + makeup_list[_temp_index].levels_need + " to unlock."); + // }); + // } + // else + // { + // btn_list[i].btn_state.selectedIndex = 0; + // int index = i; + // btn_list[i].SetClick(() => + // { + // for (int i = PreferencesMgr.Instance.MakeupTaskHistory.Count - 1; i >= 0; i--) + // { + // if (PreferencesMgr.Instance.MakeupTaskHistory[i].tableId == index + 1) + // { + // makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory[i]; + // now_selectindex = index; + // break; + // } + // } + + // InitView(); + // }); + // } + // } + + + } + public static string GetRandomNum(int count) + { + var resultStr = new StringBuilder(); + for (int i = 0; i < count; i++) + { + resultStr.Append(UnityEngine.Random.Range(0, 10)); + } + + return resultStr.ToString(); + } + + + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUI.cs.meta b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUI.cs.meta new file mode 100644 index 0000000..5cf0c29 --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 83977547df0702b459b5d46663058214 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUICtrl.cs b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUICtrl.cs new file mode 100644 index 0000000..b5eaf6b --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUICtrl.cs @@ -0,0 +1,74 @@ +using BingoBrain.Core; +using BingoBrain.HotFix; + +namespace BingoBrain +{ + public class ExchangeUICtrl : BaseUICtrl + { + private ExchangeUI ui; + private ExchangeModel model; + + private uint openUIMsg = SkinInfo.ExchangeUI_Open; + private uint closeUIMsg = SkinInfo.ExchangeUI_Close; + + #region 生命周期 + protected override void OnInit() + { + //model = ModuleManager.Instance.GetModel(ModelConst.ExchangeModel) as ExchangeModel; + } + + protected override void OnDispose() + { + } + + public override void OpenUI(object args = null) + { + if (ui == null) + { + ui = new ExchangeUI(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 + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUICtrl.cs.meta b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUICtrl.cs.meta new file mode 100644 index 0000000..0b8ada3 --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/Exchange/ExchangeUICtrl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0a926f504377f2d439f5a42267299dea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs b/Assets/BingoBrain/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs index e8f3c68..5b8f165 100644 --- a/Assets/BingoBrain/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs +++ b/Assets/BingoBrain/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs @@ -179,7 +179,7 @@ namespace BingoBrain } if (PreferencesMgr.Instance.MakeupTaskHistory.Count > 1) { - ui.group_.visible = true; + // ui.group_.visible = true; } else { @@ -710,6 +710,7 @@ namespace BingoBrain if (makeupTaskData.videoCount >= vo.ad_need) { (ui.btn_chout as FGUI.tixian.btn_get).state.selectedIndex = 0; + ui.btn_chout.title = GameHelper.getDesByKey("ch_out_2"); ui.btn_chout.SetClick(() => { if (makeupTaskData.videoCount >= vo.ad_need) diff --git a/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes b/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes index 4348cdb..2e66bf6 100644 Binary files a/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes and b/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes differ diff --git a/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0.png b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0.png index e5a0268..8de5472 100644 Binary files a/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0.png and b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0.png differ diff --git a/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_1.png b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_1.png index c23afac..1c15f19 100644 Binary files a/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_1.png and b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_1.png differ diff --git a/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_2.png b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_2.png new file mode 100644 index 0000000..90c265c Binary files /dev/null and b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_2.png differ diff --git a/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_2.png.meta b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_2.png.meta new file mode 100644 index 0000000..b1c1722 --- /dev/null +++ b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_2.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: c47ad66c87676554a8fb4b48987abe7f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_3.png b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_3.png new file mode 100644 index 0000000..8307456 Binary files /dev/null and b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_3.png differ diff --git a/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_3.png.meta b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_3.png.meta new file mode 100644 index 0000000..91a40b5 --- /dev/null +++ b/Assets/Resources/AssetHotFix/FGUI/JMall_atlas0_3.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 29785a8ad3f9acd4e966dcba2138905d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/AssetHotFix/FGUI/JMall_fui.bytes b/Assets/Resources/AssetHotFix/FGUI/JMall_fui.bytes index f96e8a1..972826f 100644 Binary files a/Assets/Resources/AssetHotFix/FGUI/JMall_fui.bytes and b/Assets/Resources/AssetHotFix/FGUI/JMall_fui.bytes differ diff --git a/Assets/Resources/AssetHotFix/FGUI/tixian_fui.bytes b/Assets/Resources/AssetHotFix/FGUI/tixian_fui.bytes index a848f1a..e592432 100644 Binary files a/Assets/Resources/AssetHotFix/FGUI/tixian_fui.bytes and b/Assets/Resources/AssetHotFix/FGUI/tixian_fui.bytes differ