diff --git a/Assets/BingoBrain/FGUI/Package/tixian/com_saveingpot.cs b/Assets/BingoBrain/FGUI/Package/tixian/com_saveingpot.cs index df80cb6..8f9b0da 100644 --- a/Assets/BingoBrain/FGUI/Package/tixian/com_saveingpot.cs +++ b/Assets/BingoBrain/FGUI/Package/tixian/com_saveingpot.cs @@ -52,7 +52,6 @@ namespace FGUI.tixian public GButton btn_close; public GButton btn_task_watch; public GRichTextField text_nowch; - public GImage text_ch_2; public const string URL = "ui://jwedp6jyupx71p"; public static com_saveingpot CreateInstance() @@ -109,7 +108,6 @@ namespace FGUI.tixian btn_close = (GButton)GetChildAt(76); btn_task_watch = (GButton)GetChildAt(77); text_nowch = (GRichTextField)GetChildAt(78); - text_ch_2 = (GImage)GetChildAt(79); } } } \ No newline at end of file diff --git a/Assets/BingoBrain/Harmony/GameHelper.cs b/Assets/BingoBrain/Harmony/GameHelper.cs index 43e2bfd..7ec2600 100644 --- a/Assets/BingoBrain/Harmony/GameHelper.cs +++ b/Assets/BingoBrain/Harmony/GameHelper.cs @@ -1658,7 +1658,7 @@ namespace BingoBrain } public static bool isRDExchangeMode() { - // return false;//zhushi + return true;//zhushi return SaveData.GetSaveobject().ExchangeModeToggle == 1; } public static string getDesByKey(string key) diff --git a/Assets/BingoBrain/ModuleUI/BingoToy/BingoToyUI.cs b/Assets/BingoBrain/ModuleUI/BingoToy/BingoToyUI.cs index 9d8de29..ed63a21 100644 --- a/Assets/BingoBrain/ModuleUI/BingoToy/BingoToyUI.cs +++ b/Assets/BingoBrain/ModuleUI/BingoToy/BingoToyUI.cs @@ -134,7 +134,7 @@ namespace BingoBrain item.quantityA[GameHelper.GetDynamicIndex(item.wheel_itemA)]); PreferencesMgr.Instance.VidelWheelLst.Add( item.quantityB[GameHelper.GetDynamicIndex(item.wheel_itemB)]); - Debug.Log(GameHelper.GetDynamicIndex(item.wheel_itemB)); + Debug.Log(GameHelper.GetDynamicIndex(item.wheel_itemB)); } PreferencesMgr.Instance.SaveFerrWheelLst(); @@ -170,9 +170,11 @@ namespace BingoBrain if (PreferencesMgr.Instance.IsOnceWheel) { id = turntable.wheel_itemA; - val = id == 102 - ? GameHelper.Get102Str((decimal)PreferencesMgr.Instance.FerrWheelLst[i]) - : PreferencesMgr.Instance.FerrWheelLst[i].ToString(); + if (id == 102) + { + val = GameHelper.isRDExchangeMode() ? $"{PreferencesMgr.Instance.FerrWheelLst[i]:N}" : GameHelper.Get102Str((decimal)PreferencesMgr.Instance.FerrWheelLst[i]); + } + else val = PreferencesMgr.Instance.FerrWheelLst[i].ToString(); } else { @@ -181,9 +183,16 @@ namespace BingoBrain { PreferencesMgr.Instance.VidelWheelLst[i] = MathF.Ceiling(PreferencesMgr.Instance.VidelWheelLst[i]); } - val = id == 102 - ? GameHelper.Get102Str((decimal)PreferencesMgr.Instance.VidelWheelLst[i]) - : PreferencesMgr.Instance.VidelWheelLst[i].ToString(); + + if (id == 102) + { + val = GameHelper.isRDExchangeMode() ? $"{PreferencesMgr.Instance.VidelWheelLst[i]:N}" : GameHelper.Get102Str((decimal)PreferencesMgr.Instance.VidelWheelLst[i]); + } + else val = PreferencesMgr.Instance.VidelWheelLst[i].ToString(); + + // val = id == 102 + // ? GameHelper.Get102Str((decimal)PreferencesMgr.Instance.VidelWheelLst[i]) + // : PreferencesMgr.Instance.VidelWheelLst[i].ToString(); } rewards.cont_currency.selectedIndex = id switch diff --git a/Assets/BingoBrain/ModuleUI/H5/H5UI.cs b/Assets/BingoBrain/ModuleUI/H5/H5UI.cs index f1f9daa..65f618e 100644 --- a/Assets/BingoBrain/ModuleUI/H5/H5UI.cs +++ b/Assets/BingoBrain/ModuleUI/H5/H5UI.cs @@ -89,5 +89,156 @@ namespace BingoBrain { } + public void ClickBtn(string name) + { + // // Debug.Log("[UNITY] Click btn: " + name); + // FGUIHelper.PlayClickSound(); + if (name == "flyBtn") + { + OnClickFlyCash(); + NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.collect_fly_number, 1); + //NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior,BuriedPointEvent.collect_fly_people,1); + } + else if (name == "rewardBtn") + { + OnClickIcon(); + + } + } + private void OnClickFlyCash() + { + // PreferencesMgr.Instance.AdCashFlyShowTime = + // GameHelper.GetNowTime() + ConfigSystem.GetConfig().flyCD; + // var rewardData = new RewardData(); + + // var singleValue = + // (decimal)Math.Round( + // UnityEngine.Random.Range(ConfigSystem.GetConfig().flyReward[0], + // ConfigSystem.GetConfig().flyReward[1]), 2); + + + // decimal rewardValue; + + + // if (flyClickCount >= flyNeedClickCount) + // { + // flyClickCount = -1; + // //var rate = GameHelper.GetVideoRate(); + // rewardValue = singleValue; + // GameHelper.ShowVideoAd("reward_fly", isCompleted => + // { + // if (isCompleted) + // { + // GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData); + // GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData); + // } + // }); + // } + // else + // { + // rewardValue = singleValue; + // } + + // var startPosition = GameHelper.GetUICenterPosition(ui.com_fly); + // var endPosition = GameHelper.GetUICenterPosition(ui.com_top.text_num); + + // var rewardSingleData = new RewardSingleData(102, rewardValue, RewardOrigin.H5Fly101) + // { + // startPosition = startPosition, + // endPosition = new Vector2(endPosition.x - 150, endPosition.y - 106) + // }; + + // rewardData.AddReward(rewardSingleData); + // rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange; + // rewardData.AddCompleted(isSuccess => + // { + // if (isSuccess) + // { + // flyClickCount++; + // } + + // SetMakeup(); + // }); + // //GameHelper.addMoney((float)rewardValue); + // GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData); + // GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData); + // CheckShowFly(); + } + private void OnClickIcon() + { + // //WebThroughUtil.WebThroughClick(H5WebThroughType.OnlineH5, ui.btn_icon); + // if (iconTime < ConfigSystem.GetConfig().ThroughRewardCD) + // { + // return; + // } + + // #if UNITY_IOS && !UNITY_EDITOR + // WebviewManager.Instance.ShowH5View(false); + // #endif + + // float[] cash_array = GameHelper.GetRewardValue(2); + + // // var temp = new { is_success = true, cash_number = cash_array[0], rate = cash_array[1], is_level_success = false, is_h5_reward = true }; + // SuccessData temp = new SuccessData(); + // temp.IsWin = true; + // temp.cash_number = cash_array[0]; + // temp.rate = (int)cash_array[1]; + // temp.IsLevelSuccess = false; + // temp.IsH5Reward = true; + // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp); + + // //UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardUI_Open); + // // var rewardData = new RewardData(); + + // // var rewardType = 111; + // // decimal rewardValue = (decimal)GameHelper.GetRewardValue(3)[0]; + + // // var rewardSingleData = new RewardSingleData(rewardType, rewardValue, RewardOrigin.H5Icon) + // // { + // // startPosition = GameHelper.GetUICenterPosition(ui.btn_icon), + // // endPosition = GameHelper.GetUICenterPosition(ui.com_top.text_num) + // // }; + // // rewardData.AddReward(rewardSingleData); + // // rewardData.AddCompleted(isSuccess => + // // { + // // ui.btn_icon.cont_state.selectedIndex = btn_icon.State_none; + // // iconTime = 0; + // // SetMakeup(); + // // }); + // // rewardData.condition = RewardCondition.AD; + // // rewardData.displayType = + // // RewardDisplayType.Dialog | RewardDisplayType.RewardFly | RewardDisplayType.ValueChange; + + // // GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData); + + // // GameHelper.addMoney((float)rewardValue); + // // GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData); + // // GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData); + + + // iconTime = 0; + // // SetMakeup(); + // NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.annular_get_number, 1); + } + private void CheckShowFly() + { + // var nowTime = GameHelper.GetNowTime(); + // var leftTime = (int)(PreferencesMgr.Instance.AdCashFlyShowTime - nowTime); + + // ui.com_fly.visible = false; + // ui.com_fly.visible = leftTime <= 0; + // if (leftTime > 0) + // { + // WebviewManager.Instance.ShowFlyBtn(false); + // isFlyShow = false; + // } + // else + // { + // //StartFly(); + // if (!isFlyShow) WebviewManager.Instance.ShowFlyBtn(true); + // isFlyShow = true; + + // } + } } } \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs b/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs index cbe8b3c..db19388 100644 --- a/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs +++ b/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs @@ -54,13 +54,18 @@ namespace BingoBrain { uiCtrlDispatcher.AddListener(openUIMsg, OpenUI); uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI); + gameDispatcher.AddListener(BingoInfo.H5ViewClickBtn, OnH5ClickBtn); } protected override void RemoveListener() { uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI); uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI); + gameDispatcher.RemoveListener(BingoInfo.H5ViewClickBtn, OnH5ClickBtn); + } + void OnH5ClickBtn(object arg) + { + ui?.ClickBtn((string)arg); } - protected override void AddServerListener() { diff --git a/Assets/BingoBrain/ModuleUI/JTod/JTodUI.cs b/Assets/BingoBrain/ModuleUI/JTod/JTodUI.cs index cd194ba..02a2e91 100644 --- a/Assets/BingoBrain/ModuleUI/JTod/JTodUI.cs +++ b/Assets/BingoBrain/ModuleUI/JTod/JTodUI.cs @@ -172,7 +172,7 @@ namespace BingoBrain else { day.cont_currency.selectedIndex = btn_day2.Currency_diam; - day.text_reward.text = $"{GameHelper.Get102Str((decimal)dailyBonus.quantity)}"; + day.text_reward.text = (GameHelper.isRDExchangeMode() && GameHelper.IsGiftSwitch()) ?$"{dailyBonus.quantity:N}" : GameHelper.Get102Str((decimal)dailyBonus.quantity); } day.text_day.text = "Day " + (index + 1); @@ -212,7 +212,7 @@ namespace BingoBrain else { day.cont_currency.selectedIndex = btn_day.Currency_diam; - day.text_reward.text = $"{GameHelper.Get102Str((decimal)dailyBonus.quantity):N}"; + day.text_reward.text = (GameHelper.isRDExchangeMode() && GameHelper.IsGiftSwitch()) ? $"{dailyBonus.quantity:N}" : GameHelper.Get102Str((decimal)dailyBonus.quantity); } day.text_day.text = "Day " + (index + 1); diff --git a/Assets/BingoBrain/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs b/Assets/BingoBrain/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs index 0a0b37a..e8f3c68 100644 --- a/Assets/BingoBrain/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs +++ b/Assets/BingoBrain/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs @@ -732,6 +732,7 @@ namespace BingoBrain ConfigSystem.GetConfig().inlineInitNum[0], makeupTaskData.inlineInitNum); makeupTaskData.order_time = GameHelper.GetNowTime(); + PreferencesMgr.Instance.Currency102 = PreferencesMgr.Instance.Currency102 - vo.item_need; PreferencesMgr.Instance.SaveMakeupTaskHistory(); GameDispatcher.Instance.Dispatch(BingoInfo.Update102); //OnInline(); @@ -785,6 +786,7 @@ namespace BingoBrain ConfigSystem.GetConfig().inlineInitNum[0], makeupTaskData.inlineInitNum); makeupTaskData.order_time = GameHelper.GetNowTime(); + PreferencesMgr.Instance.Currency102 = PreferencesMgr.Instance.Currency102 - vo.item_need; PreferencesMgr.Instance.SaveMakeupTaskHistory(); GameDispatcher.Instance.Dispatch(BingoInfo.Update102); //OnInline(); diff --git a/Assets/BingoBrain/ModuleUI/SaveingPot/SaveingPotUI.cs b/Assets/BingoBrain/ModuleUI/SaveingPot/SaveingPotUI.cs index fa68fa7..ee0988c 100644 --- a/Assets/BingoBrain/ModuleUI/SaveingPot/SaveingPotUI.cs +++ b/Assets/BingoBrain/ModuleUI/SaveingPot/SaveingPotUI.cs @@ -738,7 +738,7 @@ namespace BingoBrain if (GameHelper.isRDExchangeMode()) { - ui.com_task.text_payer.SetVar("amt", "" + makeupTaskData.amount).FlushVars(); + ui.com_task.text_payer.SetVar("amt", "" + makeupTaskData.amount).FlushVars(); } else { @@ -922,7 +922,7 @@ namespace BingoBrain for (int i = 0; i < btn_list.Count; i++) { - btn_list[i].text_ch.text = (GameHelper.isRDExchangeMode() ? "" : "") + GameHelper.Get102Str_new(makeup_list[i].item_need); + btn_list[i].text_ch.text = (GameHelper.isRDExchangeMode() ? "" : "$") + makeup_list[i].item_need; Debug.Log(makeup_list[i].item_need); btn_list[i].index.selectedIndex = i; if (i >= saveingpot_history.Count) diff --git a/Assets/BingoBrain/ModuleUI/StarReward/StarRewardUI.cs b/Assets/BingoBrain/ModuleUI/StarReward/StarRewardUI.cs index fddc19d..8004909 100644 --- a/Assets/BingoBrain/ModuleUI/StarReward/StarRewardUI.cs +++ b/Assets/BingoBrain/ModuleUI/StarReward/StarRewardUI.cs @@ -89,7 +89,7 @@ namespace BingoBrain ui.cash_text.text = cash.ToString(); Out102 item = GameHelper.GetDynamicVersion_Cash(); ui.rate_text.text = "UP TO+" + item.cashmultiple + "00%"; - ui.btn_adget.title = "$" + cash * item.cashmultiple; + ui.btn_adget.title = GameHelper.isRDExchangeMode() ? (cash * item.cashmultiple).ToString() : "$" + cash * item.cashmultiple; ui.btn_get.SetClick(() => { CheckReward(cash / 10); diff --git a/Assets/BingoBrain/System/Game/JsonSystem.cs b/Assets/BingoBrain/System/Game/JsonSystem.cs index 4989853..5725764 100644 --- a/Assets/BingoBrain/System/Game/JsonSystem.cs +++ b/Assets/BingoBrain/System/Game/JsonSystem.cs @@ -294,7 +294,7 @@ namespace BingoBrain GetGameConfig(dictionary); GetGameConfig(dictionary);//兑换 - Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig().dataList)); +// Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig().dataList)); exBrPoolModel.config_name_list = ConfigSystem.GetConfig().dataList[0].user_name.Split(",").ToList(); exBrPoolModel.config_money_list = ConfigSystem.GetConfig().dataList[0].amount.Split(",").ToList(); exBrPoolModel_2.config_name_list = ConfigSystem.GetConfig().dataList[0].user_name.Split(",").ToList(); diff --git a/Assets/Plugins/iOS/H5View.m b/Assets/Plugins/iOS/H5View.m index b42c97e..5cc5789 100644 --- a/Assets/Plugins/iOS/H5View.m +++ b/Assets/Plugins/iOS/H5View.m @@ -1019,7 +1019,7 @@ } if(web_2_through_time