修改bug

This commit is contained in:
2026-05-18 16:03:00 +08:00
parent 137f9020b8
commit f9974367d7
13 changed files with 246 additions and 81 deletions
+151
View File
@@ -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<CommonModel>().flyCD;
// var rewardData = new RewardData();
// var singleValue =
// (decimal)Math.Round(
// UnityEngine.Random.Range(ConfigSystem.GetConfig<CommonModel>().flyReward[0],
// ConfigSystem.GetConfig<CommonModel>().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<CommonModel>().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;
// }
}
}
}