This commit is contained in:
2026-05-11 14:11:22 +08:00
parent c5d1aabad1
commit 4f7eabd11f
4 changed files with 143 additions and 116 deletions
+31
View File
@@ -3,6 +3,10 @@ using UnityEngine;
using BingoBrain.Asset;
using BingoBrain.HotFix;
using Unity.VisualScripting;
using DontConfuse;
using FairyGUI;
#if UNITY_EDITOR
using UnityEditor;
#endif
@@ -75,6 +79,33 @@ namespace BingoBrain
SaveingPotHelper.CheckSaveingPot();
SaveingPotHelper.TestingClearTime();
// HideLoadingUI();
if (GameHelper.IsGiftSwitch())
{
WebviewManager.Instance.SetFullScreen();
int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch;
int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch;
int offset_y = 0;
int offset_y1 = 0;
Debug.Log("barry offset_y: " + offset_y + " offset_y1: " + offset_y1);
float top_offset = 0;//fgui中的顶部信息的高度
float buttom_offset = 157;
if (Screen.safeArea.y != 0)
{//刘海屏
top_offset += Screen.safeArea.y;
}
WebviewManager.Instance.SetOffset(offset_y, offset_y1);
WebviewManager.Instance.SetPadding(0, top_offset / GRoot.inst.height, 0, buttom_offset / GRoot.inst.height);
WebviewManager.Instance.RefreshUrl();
// Debug.Log($"flyswitch==1 ------ {flyswitch == 1}");
// Debug.Log($"propswitch==1 ------ {propswitch == 1}");
WebviewManager.Instance.setFlyBtnTag(flyswitch == 1);
WebviewManager.Instance.setRewardBtnTag(propswitch == 1);
WebviewManager.Instance.SetDarkThough(false);
WebviewManager.Instance.ShowH5View(false);
WebviewManager.Instance.SetBtn(ConfigSystem.GetConfig<CommonModel>().propCoord[0], ConfigSystem.GetConfig<CommonModel>().propCoord[1], 60, 60);
}
});
SaveingPotHelper.ResetHistory();
}
@@ -84,17 +84,12 @@ namespace BingoBrain
public class GameUrls : BingoBrainConfigData
{
public string[] countryCode;
public string[] excludedCountryCode;
public string webLink;
public int webType;
public int sectionalizerId;
public int userType;
public int probability;
public int[] webTimesCT;
public int[] hideWebTimesCT;
public int refreshMax;
public int darkWebTimesCT;
public int darkWebTimesCT2;
public int wvType;
public int wvthrough;
public int isMagic;
@@ -207,6 +207,7 @@ namespace BingoBrain
Debug.Log(light_weblist.Count);
Debug.Log(dark_weblist.Count);
Debug.Log("////////////////////////");
}
}
+114 -114
View File
@@ -555,154 +555,154 @@ namespace DontConfuse
// if (gameUrlInfo == null) return;
//TODO: show invisible h5
// var Dailyrefresh_reamain = 0;
// var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
// DateTime newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
// newDate = newDate.AddSeconds(GameHelper.GetNowTime(true));
// var newDays = newDate.Day;
var Dailyrefresh_reamain = 0;
var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
DateTime newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
newDate = newDate.AddSeconds(GameHelper.GetNowTime());
var newDays = newDate.Day;
// if (last_time == newDays)
if (last_time == newDays)
{
Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes -
PlayerPrefs.GetInt("Dailyrefreshnum", 0);
}
else
{
PlayerPrefs.SetInt("Dailyrefreshnum", 0);
Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes;
PlayerPrefs.SetInt("Dayreftimes", newDays);
}
int dark_last_time = PlayerPrefs.GetInt("dark_refreshDay", 0);
DateTime dark_newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
dark_newDate = dark_newDate.AddSeconds(GameHelper.GetNowTime());
var dark_newDays = dark_newDate.Day;
string darkWVDailyrefreshtimes_str = "";
if (SaveData.GetSaveobject().dark_Dayref == null)
{
SaveData.GetSaveobject().dark_Dayref = new int[2];
}
if (dark_last_time == dark_newDays)
{
// dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index) - 1] -
// PlayerPrefs.GetInt("dark_Dayref", 0);
for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
{
if (i != 0) darkWVDailyrefreshtimes_str += "|";
darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i] - SaveData.GetSaveobject().dark_Dayref[i];
}
}
else
{
// PlayerPrefs.SetInt("dark_Dayref", 0);
for (int i = 0; i < SaveData.GetSaveobject().dark_Dayref.Length; i++)
{
SaveData.GetSaveobject().dark_Dayref[i] = 0;
}
SaveData.saveDataFunc();
// dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index)];
for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
{
if (i != 0) darkWVDailyrefreshtimes_str += "|";
darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i];
}
PlayerPrefs.SetInt("dark_refreshDay", dark_newDays);
}
// var last_login_time = PlayerPrefs.GetInt("last_login_time", 0);//获取上次登录日期
// PlayerPrefs.SetInt("last_login_time", newDays);
string light_str = "";
string dark_str = "";
for (int i = 0; i < ConfigSystem.light_weblist.Count; i++)
{
int can_refresh_numbners = 0;
// if (last_login_time==newDays)
// {
// Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes -
// PlayerPrefs.GetInt("Dailyrefreshnum", 0);
// can_refresh_numbners=ConfigSystem.light_weblist[i].refreshMax- PlayerPrefs.GetInt(ConfigSystem.light_weblist[i].webLink, 0);
// if (can_refresh_numbners < 0) can_refresh_numbners = 0;
// }
// else
// {
// PlayerPrefs.SetInt("Dailyrefreshnum", 0);
// Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes;
// PlayerPrefs.SetInt("Dayreftimes", newDays);
can_refresh_numbners = ConfigSystem.light_weblist[i].refreshMax;
//if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
// PlayerPrefs.SetInt(ConfigSystem.light_weblist[i].webLink, 0);
// }
// int dark_last_time = PlayerPrefs.GetInt("dark_refreshDay", 0);
if (i != 0)
{
light_str += "|";
}
// DateTime dark_newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
// dark_newDate = dark_newDate.AddSeconds(GameHelper.GetNowTime(true));
// var dark_newDays = dark_newDate.Day;
// string darkWVDailyrefreshtimes_str = "";
// if (SaveData.GetSaveobject().dark_Dayref == null)
light_str += ConfigSystem.light_weblist[i].webLink + "#" + ConfigSystem.light_weblist[i].probability + "#" + can_refresh_numbners + "#" + ConfigSystem.light_weblist[i].darkWebTimesCT; ;
}
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
{
int can_refresh_numbners = 0;
// if (last_login_time==newDays)
// {
// SaveData.GetSaveobject().dark_Dayref = new int[2];
// }
// if (dark_last_time == dark_newDays)
// {
// // dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index) - 1] -
// // PlayerPrefs.GetInt("dark_Dayref", 0);
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
// {
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i] - SaveData.GetSaveobject().dark_Dayref[i];
// }
// can_refresh_numbners=ConfigSystem.dark_weblist[i].refreshMax- PlayerPrefs.GetInt(ConfigSystem.dark_weblist[i].webLink, 0);
// if (can_refresh_numbners < 0) can_refresh_numbners = 0;
// }
// else
// {
// // PlayerPrefs.SetInt("dark_Dayref", 0);
// for (int i = 0; i < SaveData.GetSaveobject().dark_Dayref.Length; i++)
// {
// SaveData.GetSaveobject().dark_Dayref[i] = 0;
// }
// SaveData.saveDataFunc();
// // dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index)];
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
// {
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i];
can_refresh_numbners = ConfigSystem.dark_weblist[i].refreshMax;
//if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
// PlayerPrefs.SetInt(ConfigSystem.dark_weblist[i].webLink, 0);
// }
// PlayerPrefs.SetInt("dark_refreshDay", dark_newDays);
// }
if (i != 0)
{
dark_str += "|";
}
// // var last_login_time = PlayerPrefs.GetInt("last_login_time", 0);//获取上次登录日期
// // PlayerPrefs.SetInt("last_login_time", newDays);
// string light_str = "";
// string dark_str = "";
// for (int i = 0; i < ConfigSystem.light_weblist.Count; i++)
// {
// int can_refresh_numbners = 0;
// // if (last_login_time==newDays)
// // {
// // can_refresh_numbners=ConfigSystem.light_weblist[i].refreshMax- PlayerPrefs.GetInt(ConfigSystem.light_weblist[i].webLink, 0);
// // if (can_refresh_numbners < 0) can_refresh_numbners = 0;
// // }
// // else
// // {
// can_refresh_numbners = ConfigSystem.light_weblist[i].refreshMax;
// //if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
// // PlayerPrefs.SetInt(ConfigSystem.light_weblist[i].webLink, 0);
// // }
// if (i != 0)
// {
// light_str += "|";
// }
// light_str += ConfigSystem.light_weblist[i].webLink + "#" + ConfigSystem.light_weblist[i].probability + "#" + can_refresh_numbners + "#" + ConfigSystem.light_weblist[i].darkWebTimesCT; ;
// }
// for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
// {
// int can_refresh_numbners = 0;
// // if (last_login_time==newDays)
// // {
// // can_refresh_numbners=ConfigSystem.dark_weblist[i].refreshMax- PlayerPrefs.GetInt(ConfigSystem.dark_weblist[i].webLink, 0);
// // if (can_refresh_numbners < 0) can_refresh_numbners = 0;
// // }
// // else
// // {
// can_refresh_numbners = ConfigSystem.dark_weblist[i].refreshMax;
// //if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
// // PlayerPrefs.SetInt(ConfigSystem.dark_weblist[i].webLink, 0);
// // }
// if (i != 0)
// {
// dark_str += "|";
// }
// dark_str += ConfigSystem.dark_weblist[i].webLink + "#" + ConfigSystem.dark_weblist[i].probability + "#" + can_refresh_numbners + "#" + ConfigSystem.dark_weblist[i].darkWebTimesCT + "#" + ConfigSystem.dark_weblist[i].wvType;
// }
dark_str += ConfigSystem.dark_weblist[i].webLink + "#" + ConfigSystem.dark_weblist[i].probability + "#" + can_refresh_numbners + "#" + ConfigSystem.dark_weblist[i].darkWebTimesCT + "#" + ConfigSystem.dark_weblist[i].wvType + "#" + ConfigSystem.dark_weblist[i].darkWebTimesCT2;
}
// string darkWVRefreshtime_str = "";
string darkWVRefreshtime_str = "";
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime.Length; i++)
// {
// if (i != 0) darkWVRefreshtime_str += "|";
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime[i].ToString();
// }
for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime.Length; i++)
{
if (i != 0) darkWVRefreshtime_str += "|";
darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime[i].ToString();
}
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2.Length; i++)
// {
// darkWVRefreshtime_str += "|";
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2[i].ToString();
// }
// Debug.Log("--------------------------------");
Debug.Log("--------------------------------");
// string add_time = ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime1[0] + "|" +
// ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime1[1] + "|" + ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime2[0] + "|" + ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime2[1];
string add_time = ConfigSystem.GetConfig<CommonModel>().WVClickAddTime[0] + "|" + ConfigSystem.GetConfig<CommonModel>().WVClickAddTime[1];
// Debug.Log(add_time);
// WebviewManager.Instance.addH5Field(ConfigSystem.GetConfig<CommonModel>().flyCtRate, ConfigSystem.GetConfig<CommonModel>().otherH5switch,
// ConfigSystem.GetConfig<CommonModel>().H5Refreshtime, Dailyrefresh_reamain, ConfigSystem.GetConfig<CommonModel>().darkThoughProbability
// , darkWVRefreshtime_str, darkWVDailyrefreshtimes_str, dark_str, light_str, GameHelper.IsGiftSwitch(), ConfigSystem.web_through_str, add_time);
Debug.Log(add_time);
WebviewManager.Instance.addH5Field(ConfigSystem.GetConfig<CommonModel>().flyCtRate, ConfigSystem.GetConfig<CommonModel>().otherH5switch,
ConfigSystem.GetConfig<CommonModel>().H5Refreshtime, Dailyrefresh_reamain, ConfigSystem.GetConfig<CommonModel>().darkThoughProbability
, darkWVRefreshtime_str, darkWVDailyrefreshtimes_str, dark_str, light_str, GameHelper.IsGiftSwitch(), ConfigSystem.web_through_str, add_time);
// WebviewManager.Instance.OpenWebView(gameUrlInfo.webLink);
//WebviewManager.Instance.setFlyCtRate(ConfigSystem.GetConfig<CommonModel>().flyCtRate);
// RefreshDataCT(isTop, gameUrlInfo);
}
public void ClickAdEvent(string ad_msg)
{
string[] temp_array = ad_msg.Split("|");