diff --git a/Assets/BingoBrain/FGUI/Package/ACommon/com_currency.cs b/Assets/BingoBrain/FGUI/Package/ACommon/com_currency.cs index 21382af..4a116c2 100644 --- a/Assets/BingoBrain/FGUI/Package/ACommon/com_currency.cs +++ b/Assets/BingoBrain/FGUI/Package/ACommon/com_currency.cs @@ -11,7 +11,6 @@ namespace FGUI.ACommon public btn_101 btn_coin; public btn_102 btn_cash; public com_avatar com_avatar; - public GGroup top_group; public const string URL = "ui://pmf3wbjiaxgih3"; public static com_currency CreateInstance() @@ -27,7 +26,6 @@ namespace FGUI.ACommon btn_coin = (btn_101)GetChildAt(1); btn_cash = (btn_102)GetChildAt(2); com_avatar = (com_avatar)GetChildAt(3); - top_group = (GGroup)GetChildAt(4); } } } \ No newline at end of file diff --git a/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs b/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs index 9d27270..af1df71 100644 --- a/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs +++ b/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs @@ -23,6 +23,10 @@ namespace FGUI.JMain public btn_taks btn_task; public btn_wheel btn_wheel; public com_mainplay com_mainplay; + public GButton settings; + public GButton btn_coin; + public GButton btn_cash; + public GComponent com_avatar; public const string URL = "ui://qw9x6rf3lbaa0"; public static com_main CreateInstance() @@ -50,6 +54,10 @@ namespace FGUI.JMain btn_task = (btn_taks)GetChildAt(12); btn_wheel = (btn_wheel)GetChildAt(13); com_mainplay = (com_mainplay)GetChildAt(14); + settings = (GButton)GetChildAt(15); + btn_coin = (GButton)GetChildAt(16); + btn_cash = (GButton)GetChildAt(17); + com_avatar = (GComponent)GetChildAt(18); } } } \ No newline at end of file diff --git a/Assets/BingoBrain/Harmony/GameHelper.cs b/Assets/BingoBrain/Harmony/GameHelper.cs index 3f57167..cfc8b00 100644 --- a/Assets/BingoBrain/Harmony/GameHelper.cs +++ b/Assets/BingoBrain/Harmony/GameHelper.cs @@ -249,7 +249,7 @@ namespace BingoBrain { case 101: { - if (UI.Instance.GetDynamicUI(UIConst.SmailUI) is SmailUI topUI2) + if (UI.Instance.GetDynamicUI(UIConst.BingoHallUI) is SmailUI topUI2) { gObject = topUI2.ui.btn_coin; } @@ -261,7 +261,7 @@ namespace BingoBrain break; case 102: { - if (UI.Instance.GetDynamicUI(UIConst.SmailUI) is SmailUI topUI2) + if (UI.Instance.GetDynamicUI(UIConst.BingoHallUI) is SmailUI topUI2) { gObject = topUI2.ui.btn_cash; } diff --git a/Assets/BingoBrain/Manager/Battle.cs b/Assets/BingoBrain/Manager/Battle.cs index 71e230b..e43b89b 100644 --- a/Assets/BingoBrain/Manager/Battle.cs +++ b/Assets/BingoBrain/Manager/Battle.cs @@ -46,8 +46,9 @@ namespace BingoBrain bg.transform.SetParent(BingoCell.root, false); CameraBoardk.Instance.mainCamera.gameObject.AddComponent(); // Debug.Log("??????????????????????????"); - // UICtrlDispatcher.Instance.Dispatch(SkinInfo.BingoHallUI_Open); - //UICtrlDispatcher.Instance.Dispatch(SkinInfo.BingoHalldUI_Open); + UICtrlDispatcher.Instance.Dispatch(SkinInfo.BingoHallUI_Open); + + InitSystems(); ShungTik.InitRoot(BingoCell.root); diff --git a/Assets/BingoBrain/Manager/Hall.cs b/Assets/BingoBrain/Manager/Hall.cs index f1a36fe..29bbf5a 100644 --- a/Assets/BingoBrain/Manager/Hall.cs +++ b/Assets/BingoBrain/Manager/Hall.cs @@ -106,7 +106,7 @@ namespace BingoBrain UICtrlDispatcher.Instance.Dispatch(SkinInfo.BottomUI_Open); UICtrlDispatcher.Instance.Dispatch(SkinInfo.BingoHallUI_Open); // UICtrlDispatcher.Instance.Dispatch(SkinInfo.BingoHalldUI_Open); - UICtrlDispatcher.Instance.Dispatch(SkinInfo.SmailUI_Open); + // UICtrlDispatcher.Instance.Dispatch(SkinInfo.SmailUI_Open); } else { diff --git a/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs b/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs index 8800e02..f64fc5f 100644 --- a/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs +++ b/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs @@ -67,6 +67,11 @@ namespace BingoBrain protected override void OnOpenBefore(object args) { InitView(); + Set101(); + Set102(); + SetName(); + ui.settings.SetClick(OnClickSetting); + // ui.com_avatar.loader_flag.visible = false; // if (!GameHelper.IsGiftSwitch() && (ConfigSystem.GetConfig().WVswitch == 1)) // { // ui.btn_h5.visible = true; @@ -78,7 +83,57 @@ namespace BingoBrain // }); } + private void OnClickSetting() + { + UICtrlDispatcher.Instance.Dispatch(SkinInfo.JThinkUI_Open); + } + public void OnUpdate101(object obj = null) + { + if (obj != null) + { + var changeValue = (decimal)obj; + model.show101 += changeValue; + model.show101 = Math.Round(model.show101, 2); + Set101(model.show101.ToString("N")); + } + } + + public void Set101(string c101 = null) + { + if (c101 == null) + { + c101 = GameHelper.Get101().ToString("N0"); + } + + ui.btn_coin.title = $"{c101}"; + } + + public void OnUpdate102(object obj = null) + { + if (obj != null) + { + var changeValue = (decimal)obj; + model.show102 += changeValue; + model.show102 = Math.Round(model.show102, 2); + Set102(model.show102.ToString("N")); + } + } + + public void Set102(string c102 = null) + { + if (c102 == null) + { + c102 = GameHelper.Get102().ToString("N"); + } + + ui.btn_cash.title = $"{c102}"; + } + + private void SetName() + { + // GameHelper.SetName(ui.com_avatar.text_name); + } protected override void OnOpen(object args) { } @@ -209,6 +264,8 @@ namespace BingoBrain UICtrlDispatcher.Instance.Dispatch(SkinInfo.JTodUI_Open); }); + model.show101 = GameHelper.Get101(); + model.show102 = GameHelper.Get102(); } @@ -371,7 +428,7 @@ namespace BingoBrain if (PreferencesMgr.Instance.CardBoardSum >= need_card) { PreferencesMgr.Instance.CardBoardSum -= need_card; - PreferencesMgr.Instance.CardBoardIndex=play_index_list[i]; + PreferencesMgr.Instance.CardBoardIndex = play_index_list[i]; ui.com_cards.text_fx.text = $"-{need_card}"; ui.touchable = false; ui.com_cards.fx_num.Play(); diff --git a/Assets/BingoBrain/ModuleUI/Smail/SmailUI.cs b/Assets/BingoBrain/ModuleUI/Smail/SmailUI.cs index 5e3dfb7..9a20a51 100644 --- a/Assets/BingoBrain/ModuleUI/Smail/SmailUI.cs +++ b/Assets/BingoBrain/ModuleUI/Smail/SmailUI.cs @@ -77,7 +77,7 @@ namespace BingoBrain } if (Screen.safeArea.y != 0) { - ui.top_group.y=-90; + // ui.top_group.y=-90; } } diff --git a/Assets/BingoBrain/System/Game/BingoSystem.cs b/Assets/BingoBrain/System/Game/BingoSystem.cs index e9d0fc6..3855b0e 100644 --- a/Assets/BingoBrain/System/Game/BingoSystem.cs +++ b/Assets/BingoBrain/System/Game/BingoSystem.cs @@ -153,8 +153,8 @@ namespace BingoBrain DOVirtual.DelayedCall(UIMgrConst.OpenUIAnimEffectTime, delegate { UICtrlDispatcher.Instance.Dispatch(SkinInfo.BingoHallUI_Open); - // UICtrlDispatcher.Instance.Dispatch(SkinInfo.BingoHalldUI_Open); - UICtrlDispatcher.Instance.Dispatch(SkinInfo.SmailUI_Open); + // UICtrlDispatcher.Instance.Dispatch(SkinInfo.BingoHalldUI_Open); + // UICtrlDispatcher.Instance.Dispatch(SkinInfo.SmailUI_Open); if (GameHelper.IsGiftSwitch() && Random.Range(0, 100) < ConfigSystem.GetConfig().backhallrate) { BingoHalldUI.Instance.OnClickHall(); diff --git a/Assets/Resources/AssetHotFix/FGUI/ACommon_fui.bytes b/Assets/Resources/AssetHotFix/FGUI/ACommon_fui.bytes index 90440dc..b2c5e07 100644 Binary files a/Assets/Resources/AssetHotFix/FGUI/ACommon_fui.bytes and b/Assets/Resources/AssetHotFix/FGUI/ACommon_fui.bytes differ diff --git a/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes b/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes index 8fef3a7..6fed700 100644 Binary files a/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes and b/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes differ