添加h5
This commit is contained in:
@@ -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)
|
||||
// {
|
||||
// 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);
|
||||
// }
|
||||
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);
|
||||
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(true));
|
||||
// var dark_newDays = dark_newDate.Day;
|
||||
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 = "";
|
||||
string darkWVDailyrefreshtimes_str = "";
|
||||
|
||||
|
||||
// if (SaveData.GetSaveobject().dark_Dayref == null)
|
||||
// {
|
||||
// SaveData.GetSaveobject().dark_Dayref = new int[2];
|
||||
// }
|
||||
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 (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];
|
||||
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)];
|
||||
}
|
||||
}
|
||||
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++)
|
||||
// {
|
||||
for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
||||
{
|
||||
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i];
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
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);//获取上次登录日期
|
||||
// // PlayerPrefs.SetInt("last_login_time", newDays);
|
||||
// var last_login_time = PlayerPrefs.GetInt("last_login_time", 0);//获取上次登录日期
|
||||
// PlayerPrefs.SetInt("last_login_time", newDays);
|
||||
|
||||
// string light_str = "";
|
||||
// string dark_str = "";
|
||||
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);
|
||||
// // }
|
||||
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 += "|";
|
||||
// }
|
||||
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);
|
||||
// // }
|
||||
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 += "|";
|
||||
// }
|
||||
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("|");
|
||||
|
||||
Reference in New Issue
Block a user