添加h5
This commit is contained in:
@@ -3,6 +3,10 @@ using UnityEngine;
|
|||||||
using BingoBrain.Asset;
|
using BingoBrain.Asset;
|
||||||
using BingoBrain.HotFix;
|
using BingoBrain.HotFix;
|
||||||
using Unity.VisualScripting;
|
using Unity.VisualScripting;
|
||||||
|
using DontConfuse;
|
||||||
|
using FairyGUI;
|
||||||
|
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
#endif
|
#endif
|
||||||
@@ -75,16 +79,43 @@ namespace BingoBrain
|
|||||||
SaveingPotHelper.CheckSaveingPot();
|
SaveingPotHelper.CheckSaveingPot();
|
||||||
SaveingPotHelper.TestingClearTime();
|
SaveingPotHelper.TestingClearTime();
|
||||||
// HideLoadingUI();
|
// 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();
|
SaveingPotHelper.ResetHistory();
|
||||||
}
|
}
|
||||||
private bool isopen = false;
|
private bool isopen = false;
|
||||||
private void ShowScene(object a = null)
|
private void ShowScene(object a = null)
|
||||||
{
|
{
|
||||||
if(isopen) return;
|
if (isopen) return;
|
||||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open);
|
UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open);
|
||||||
GameHelper.PostFunnelLogin("enterButtonShow");
|
GameHelper.PostFunnelLogin("enterButtonShow");
|
||||||
isopen=true;
|
isopen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
|
|||||||
@@ -84,17 +84,12 @@ namespace BingoBrain
|
|||||||
public class GameUrls : BingoBrainConfigData
|
public class GameUrls : BingoBrainConfigData
|
||||||
{
|
{
|
||||||
|
|
||||||
public string[] countryCode;
|
|
||||||
public string[] excludedCountryCode;
|
|
||||||
public string webLink;
|
public string webLink;
|
||||||
public int webType;
|
public int webType;
|
||||||
public int sectionalizerId;
|
|
||||||
public int userType;
|
|
||||||
public int probability;
|
public int probability;
|
||||||
public int[] webTimesCT;
|
|
||||||
public int[] hideWebTimesCT;
|
|
||||||
public int refreshMax;
|
public int refreshMax;
|
||||||
public int darkWebTimesCT;
|
public int darkWebTimesCT;
|
||||||
|
public int darkWebTimesCT2;
|
||||||
public int wvType;
|
public int wvType;
|
||||||
public int wvthrough;
|
public int wvthrough;
|
||||||
public int isMagic;
|
public int isMagic;
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ namespace BingoBrain
|
|||||||
|
|
||||||
Debug.Log(light_weblist.Count);
|
Debug.Log(light_weblist.Count);
|
||||||
Debug.Log(dark_weblist.Count);
|
Debug.Log(dark_weblist.Count);
|
||||||
|
Debug.Log("////////////////////////");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -555,154 +555,154 @@ namespace DontConfuse
|
|||||||
|
|
||||||
// if (gameUrlInfo == null) return;
|
// if (gameUrlInfo == null) return;
|
||||||
//TODO: show invisible h5
|
//TODO: show invisible h5
|
||||||
// var Dailyrefresh_reamain = 0;
|
var Dailyrefresh_reamain = 0;
|
||||||
// var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
|
var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
|
||||||
// DateTime newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
DateTime newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||||
// newDate = newDate.AddSeconds(GameHelper.GetNowTime(true));
|
newDate = newDate.AddSeconds(GameHelper.GetNowTime());
|
||||||
// var newDays = newDate.Day;
|
var newDays = newDate.Day;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if (last_time == newDays)
|
if (last_time == newDays)
|
||||||
// {
|
{
|
||||||
// Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes -
|
Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes -
|
||||||
// PlayerPrefs.GetInt("Dailyrefreshnum", 0);
|
PlayerPrefs.GetInt("Dailyrefreshnum", 0);
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// PlayerPrefs.SetInt("Dailyrefreshnum", 0);
|
PlayerPrefs.SetInt("Dailyrefreshnum", 0);
|
||||||
// Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes;
|
Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes;
|
||||||
// PlayerPrefs.SetInt("Dayreftimes", newDays);
|
PlayerPrefs.SetInt("Dayreftimes", newDays);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// int dark_last_time = PlayerPrefs.GetInt("dark_refreshDay", 0);
|
int dark_last_time = PlayerPrefs.GetInt("dark_refreshDay", 0);
|
||||||
|
|
||||||
// DateTime dark_newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
DateTime dark_newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||||
// dark_newDate = dark_newDate.AddSeconds(GameHelper.GetNowTime(true));
|
dark_newDate = dark_newDate.AddSeconds(GameHelper.GetNowTime());
|
||||||
// var dark_newDays = dark_newDate.Day;
|
var dark_newDays = dark_newDate.Day;
|
||||||
|
|
||||||
|
|
||||||
// string darkWVDailyrefreshtimes_str = "";
|
string darkWVDailyrefreshtimes_str = "";
|
||||||
|
|
||||||
|
|
||||||
// if (SaveData.GetSaveobject().dark_Dayref == null)
|
if (SaveData.GetSaveobject().dark_Dayref == null)
|
||||||
// {
|
{
|
||||||
// SaveData.GetSaveobject().dark_Dayref = new int[2];
|
SaveData.GetSaveobject().dark_Dayref = new int[2];
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (dark_last_time == dark_newDays)
|
if (dark_last_time == dark_newDays)
|
||||||
// {
|
{
|
||||||
// // dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index) - 1] -
|
// dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index) - 1] -
|
||||||
// // PlayerPrefs.GetInt("dark_Dayref", 0);
|
// PlayerPrefs.GetInt("dark_Dayref", 0);
|
||||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
||||||
// {
|
{
|
||||||
|
|
||||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i] - SaveData.GetSaveobject().dark_Dayref[i];
|
darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i] - SaveData.GetSaveobject().dark_Dayref[i];
|
||||||
|
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// // PlayerPrefs.SetInt("dark_Dayref", 0);
|
// PlayerPrefs.SetInt("dark_Dayref", 0);
|
||||||
// for (int i = 0; i < SaveData.GetSaveobject().dark_Dayref.Length; i++)
|
for (int i = 0; i < SaveData.GetSaveobject().dark_Dayref.Length; i++)
|
||||||
// {
|
{
|
||||||
// SaveData.GetSaveobject().dark_Dayref[i] = 0;
|
SaveData.GetSaveobject().dark_Dayref[i] = 0;
|
||||||
// }
|
}
|
||||||
// SaveData.saveDataFunc();
|
SaveData.saveDataFunc();
|
||||||
// // dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index)];
|
// dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index)];
|
||||||
|
|
||||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
||||||
// {
|
{
|
||||||
|
|
||||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i];
|
darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i];
|
||||||
|
|
||||||
// }
|
}
|
||||||
|
|
||||||
// PlayerPrefs.SetInt("dark_refreshDay", dark_newDays);
|
PlayerPrefs.SetInt("dark_refreshDay", dark_newDays);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// // var last_login_time = PlayerPrefs.GetInt("last_login_time", 0);//获取上次登录日期
|
// var last_login_time = PlayerPrefs.GetInt("last_login_time", 0);//获取上次登录日期
|
||||||
// // PlayerPrefs.SetInt("last_login_time", newDays);
|
// PlayerPrefs.SetInt("last_login_time", newDays);
|
||||||
|
|
||||||
// string light_str = "";
|
string light_str = "";
|
||||||
// string dark_str = "";
|
string dark_str = "";
|
||||||
|
|
||||||
// for (int i = 0; i < ConfigSystem.light_weblist.Count; i++)
|
for (int i = 0; i < ConfigSystem.light_weblist.Count; i++)
|
||||||
// {
|
{
|
||||||
// int can_refresh_numbners = 0;
|
int can_refresh_numbners = 0;
|
||||||
// // if (last_login_time==newDays)
|
// if (last_login_time==newDays)
|
||||||
// // {
|
// {
|
||||||
// // can_refresh_numbners=ConfigSystem.light_weblist[i].refreshMax- PlayerPrefs.GetInt(ConfigSystem.light_weblist[i].webLink, 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;
|
// if (can_refresh_numbners < 0) can_refresh_numbners = 0;
|
||||||
// // }
|
// }
|
||||||
// // else
|
// else
|
||||||
// // {
|
// {
|
||||||
// can_refresh_numbners = ConfigSystem.light_weblist[i].refreshMax;
|
can_refresh_numbners = ConfigSystem.light_weblist[i].refreshMax;
|
||||||
// //if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
|
//if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
|
||||||
// // PlayerPrefs.SetInt(ConfigSystem.light_weblist[i].webLink, 0);
|
// PlayerPrefs.SetInt(ConfigSystem.light_weblist[i].webLink, 0);
|
||||||
// // }
|
// }
|
||||||
|
|
||||||
// if (i != 0)
|
if (i != 0)
|
||||||
// {
|
{
|
||||||
// light_str += "|";
|
light_str += "|";
|
||||||
// }
|
}
|
||||||
|
|
||||||
// light_str += ConfigSystem.light_weblist[i].webLink + "#" + ConfigSystem.light_weblist[i].probability + "#" + can_refresh_numbners + "#" + ConfigSystem.light_weblist[i].darkWebTimesCT; ;
|
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++)
|
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||||
// {
|
{
|
||||||
// int can_refresh_numbners = 0;
|
int can_refresh_numbners = 0;
|
||||||
// // if (last_login_time==newDays)
|
// if (last_login_time==newDays)
|
||||||
// // {
|
// {
|
||||||
// // can_refresh_numbners=ConfigSystem.dark_weblist[i].refreshMax- PlayerPrefs.GetInt(ConfigSystem.dark_weblist[i].webLink, 0);
|
// 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;
|
// if (can_refresh_numbners < 0) can_refresh_numbners = 0;
|
||||||
// // }
|
// }
|
||||||
// // else
|
// else
|
||||||
// // {
|
// {
|
||||||
// can_refresh_numbners = ConfigSystem.dark_weblist[i].refreshMax;
|
can_refresh_numbners = ConfigSystem.dark_weblist[i].refreshMax;
|
||||||
// //if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
|
//if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
|
||||||
// // PlayerPrefs.SetInt(ConfigSystem.dark_weblist[i].webLink, 0);
|
// PlayerPrefs.SetInt(ConfigSystem.dark_weblist[i].webLink, 0);
|
||||||
// // }
|
// }
|
||||||
|
|
||||||
// if (i != 0)
|
if (i != 0)
|
||||||
// {
|
{
|
||||||
// dark_str += "|";
|
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++)
|
for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime.Length; i++)
|
||||||
// {
|
{
|
||||||
// if (i != 0) darkWVRefreshtime_str += "|";
|
if (i != 0) darkWVRefreshtime_str += "|";
|
||||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime[i].ToString();
|
darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime[i].ToString();
|
||||||
// }
|
}
|
||||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2.Length; i++)
|
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2.Length; i++)
|
||||||
// {
|
// {
|
||||||
// darkWVRefreshtime_str += "|";
|
// darkWVRefreshtime_str += "|";
|
||||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2[i].ToString();
|
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2[i].ToString();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Debug.Log("--------------------------------");
|
Debug.Log("--------------------------------");
|
||||||
|
|
||||||
// string add_time = ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime1[0] + "|" +
|
string add_time = ConfigSystem.GetConfig<CommonModel>().WVClickAddTime[0] + "|" + ConfigSystem.GetConfig<CommonModel>().WVClickAddTime[1];
|
||||||
// ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime1[1] + "|" + ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime2[0] + "|" + ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime2[1];
|
|
||||||
|
|
||||||
// Debug.Log(add_time);
|
Debug.Log(add_time);
|
||||||
// WebviewManager.Instance.addH5Field(ConfigSystem.GetConfig<CommonModel>().flyCtRate, ConfigSystem.GetConfig<CommonModel>().otherH5switch,
|
WebviewManager.Instance.addH5Field(ConfigSystem.GetConfig<CommonModel>().flyCtRate, ConfigSystem.GetConfig<CommonModel>().otherH5switch,
|
||||||
// ConfigSystem.GetConfig<CommonModel>().H5Refreshtime, Dailyrefresh_reamain, ConfigSystem.GetConfig<CommonModel>().darkThoughProbability
|
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);
|
, darkWVRefreshtime_str, darkWVDailyrefreshtimes_str, dark_str, light_str, GameHelper.IsGiftSwitch(), ConfigSystem.web_through_str, add_time);
|
||||||
// WebviewManager.Instance.OpenWebView(gameUrlInfo.webLink);
|
// WebviewManager.Instance.OpenWebView(gameUrlInfo.webLink);
|
||||||
|
|
||||||
//WebviewManager.Instance.setFlyCtRate(ConfigSystem.GetConfig<CommonModel>().flyCtRate);
|
//WebviewManager.Instance.setFlyCtRate(ConfigSystem.GetConfig<CommonModel>().flyCtRate);
|
||||||
// RefreshDataCT(isTop, gameUrlInfo);
|
// RefreshDataCT(isTop, gameUrlInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClickAdEvent(string ad_msg)
|
public void ClickAdEvent(string ad_msg)
|
||||||
{
|
{
|
||||||
string[] temp_array = ad_msg.Split("|");
|
string[] temp_array = ad_msg.Split("|");
|
||||||
|
|||||||
Reference in New Issue
Block a user