fix:更换sdk,修复bug
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using FairyGUI;
|
||||
using Newtonsoft.Json;
|
||||
using RedHotRoast;
|
||||
using SGModule.NetKit;
|
||||
using UnityEngine;
|
||||
@@ -94,7 +93,7 @@ namespace DontConfuse
|
||||
}
|
||||
public void SetDarkThough(bool though)
|
||||
{
|
||||
if(!GameHelper.IsGiftSwitch()) return;
|
||||
if (!GameHelper.IsGiftSwitch()) return;
|
||||
// if (though)
|
||||
// {
|
||||
// if (UI.Instance.IsExistUI(UIConst.LevelSuccessUI) || UI.Instance.IsExistUI(UIConst.MakeupConfirmUI) ||
|
||||
@@ -204,7 +203,6 @@ namespace DontConfuse
|
||||
var newDays = newDate.Day;
|
||||
|
||||
|
||||
|
||||
if (times == "Dailyrefreshtimes")
|
||||
{
|
||||
var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
|
||||
@@ -223,21 +221,49 @@ namespace DontConfuse
|
||||
string darkWVRefreshtime_str = "";
|
||||
string darkWVDailyrefreshtimes_str = "";
|
||||
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime.Length; i++)
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime[i].ToString();
|
||||
// }
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime2.Length; i++)
|
||||
// {
|
||||
// darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime2[i].ToString();
|
||||
// }
|
||||
|
||||
int dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (i != 0) darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime[i].ToString();
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[0];
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[1];
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime2.Length; i++)
|
||||
|
||||
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[i].ToString();
|
||||
// }
|
||||
|
||||
dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime2[i].ToString();
|
||||
}
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes.Length; i++)
|
||||
{
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[i].ToString();
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes;
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WebviewManager.Instance.addH5Field(ConfigSystem.GetCommonConf().flyCtRate, ConfigSystem.GetCommonConf().otherH5switch,
|
||||
ConfigSystem.GetCommonConf().H5Refreshtime, ConfigSystem.GetCommonConf().Dailyrefreshtimes, ConfigSystem.GetCommonConf().darkThoughProbability, darkWVRefreshtime_str,
|
||||
darkWVDailyrefreshtimes_str, "", "", GameHelper.IsGiftSwitch(), "", "");
|
||||
@@ -272,20 +298,43 @@ namespace DontConfuse
|
||||
string darkWVRefreshtime_str = "";
|
||||
string darkWVDailyrefreshtimes_str = "";
|
||||
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime.Length; i++)
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime[i].ToString();
|
||||
// }
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime2.Length; i++)
|
||||
// {
|
||||
// darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime2[i].ToString();
|
||||
// }
|
||||
int dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (i != 0) darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime[i].ToString();
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[0];
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[1];
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime2.Length; i++)
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[i].ToString();
|
||||
// }
|
||||
|
||||
dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime2[i].ToString();
|
||||
}
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes.Length; i++)
|
||||
{
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[i].ToString();
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes;
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
WebviewManager.Instance.addH5Field(ConfigSystem.GetCommonConf().flyCtRate, ConfigSystem.GetCommonConf().otherH5switch,
|
||||
ConfigSystem.GetCommonConf().H5Refreshtime, ConfigSystem.GetCommonConf().Dailyrefreshtimes, ConfigSystem.GetCommonConf().darkThoughProbability, darkWVRefreshtime_str,
|
||||
@@ -304,6 +353,7 @@ namespace DontConfuse
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
|
||||
int numbers = 0;
|
||||
for (int i = 0; i < ConfigSystem.light_weblist.Count; i++)
|
||||
{
|
||||
@@ -355,12 +405,14 @@ namespace DontConfuse
|
||||
if (name == null) return;
|
||||
if (name == "flyBtn")
|
||||
{
|
||||
// NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.fly_ct_number, 1);
|
||||
//NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior,BuriedPointEvent.fly_ct_people,1);
|
||||
TrackKit.SendEvent(HallBehaviorTrack.Event, HallBehaviorTrack.Property.fly_ct_number);
|
||||
}
|
||||
|
||||
if (name == "rewardBtn")
|
||||
{
|
||||
// NetworkKit.BuriedPointdPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.annular_ct_number, 1);
|
||||
//NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior,BuriedPointEvent.annular_ct_people,1);
|
||||
TrackKit.SendEvent(HallBehaviorTrack.Event, HallBehaviorTrack.Property.annular_ct_number);
|
||||
}
|
||||
@@ -517,18 +569,18 @@ namespace DontConfuse
|
||||
}
|
||||
|
||||
EndLoop: Debug.Log("");
|
||||
// if (click_card)
|
||||
// {
|
||||
// if (orthoCamera == null) orthoCamera = GameObject.Find("GameCamera").GetComponent<Camera>();
|
||||
// Ray ray = orthoCamera.ScreenPointToRay(new Vector2(float.Parse(a[0]) * Screen.width, (1 - float.Parse(a[1])) * Screen.height));
|
||||
// RaycastHit hit;
|
||||
// int layerMask = 1 << 6;
|
||||
if (click_card)
|
||||
{
|
||||
if (orthoCamera == null) orthoCamera = GameObject.Find("GameCamera").GetComponent<Camera>();
|
||||
Ray ray = orthoCamera.ScreenPointToRay(new Vector2(float.Parse(a[0]) * Screen.width, (1 - float.Parse(a[1])) * Screen.height));
|
||||
RaycastHit hit;
|
||||
int layerMask = 1 << 6;
|
||||
|
||||
// if (Physics.Raycast(ray, out hit, Mathf.Infinity, layerMask))
|
||||
// {
|
||||
// // GameDispatcher.Instance.Dispatch(GameMsg.card_click, hit.collider.gameObject.name);
|
||||
// }
|
||||
// }
|
||||
if (Physics.Raycast(ray, out hit, Mathf.Infinity, layerMask))
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.card_click, hit.collider.gameObject.name);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -581,39 +633,59 @@ namespace DontConfuse
|
||||
|
||||
if (SaveData.GetSaveObject().dark_Dayref == null)
|
||||
{
|
||||
SaveData.GetSaveObject().dark_Dayref = new int[2];
|
||||
SaveData.GetSaveObject().dark_Dayref = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0,0};
|
||||
}
|
||||
|
||||
if (dark_last_time == dark_newDays)
|
||||
{
|
||||
// dark_Dailyrefresh_reamain = ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[Int32.Parse(webview_index) - 1] -
|
||||
// PlayerPrefs.GetInt("dark_Dayref", 0);
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes.Length; i++)
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes.Length; i++)
|
||||
// {
|
||||
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[i] - SaveData.GetSaveobject().dark_Dayref[i];
|
||||
|
||||
// }
|
||||
int dark_type_ = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[i] - SaveData.GetSaveObject().dark_Dayref[i];
|
||||
|
||||
if (dark_type_ != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
dark_type_ = ConfigSystem.dark_weblist[i].wvType;
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
Debug.Log(dark_type_);
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes - SaveData.GetSaveObject().dark_Dayref[dark_type_ - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 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.Count; i++)
|
||||
{
|
||||
SaveData.GetSaveObject().dark_Dayref[i] = 0;
|
||||
}
|
||||
SaveData.SaveDataFunc();
|
||||
// dark_Dailyrefresh_reamain = ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[Int32.Parse(webview_index)];
|
||||
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes.Length; i++)
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes.Length; i++)
|
||||
// {
|
||||
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[i];
|
||||
|
||||
// }
|
||||
int dark_type_ = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.GetCommonConf().darkWVDailyrefreshtimes[i];
|
||||
|
||||
if (dark_type_ != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
dark_type_ = ConfigSystem.dark_weblist[i].wvType;
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes;
|
||||
}
|
||||
}
|
||||
|
||||
PlayerPrefs.SetInt("dark_refreshDay", dark_newDays);
|
||||
}
|
||||
|
||||
@@ -665,29 +737,50 @@ namespace DontConfuse
|
||||
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 + "#" + ConfigSystem.dark_weblist[i].darkWebTimesCT2;
|
||||
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].WVOffset ;
|
||||
}
|
||||
|
||||
|
||||
string darkWVRefreshtime_str = "";
|
||||
|
||||
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime.Length; i++)
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime[i].ToString();
|
||||
// }
|
||||
// for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime2.Length; i++)
|
||||
// {
|
||||
// darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime2[i].ToString();
|
||||
// }
|
||||
int dark_type = -1;
|
||||
string add_time = "";
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (i != 0) darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime[i].ToString();
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0)
|
||||
{
|
||||
darkWVRefreshtime_str += "|";
|
||||
add_time += "|";
|
||||
}
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[0];
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[1];
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
add_time += ConfigSystem.dark_weblist[i].WVClickAddTime;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < ConfigSystem.GetCommonConf().darkWVRefreshtime2.Length; i++)
|
||||
{
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.GetCommonConf().darkWVRefreshtime2[i].ToString();
|
||||
}
|
||||
|
||||
Debug.Log("--------------------------------");
|
||||
|
||||
string add_time = ConfigSystem.GetCommonConf().WVClickAddTime[0] + "|" + ConfigSystem.GetCommonConf().WVClickAddTime[1];
|
||||
// add_time+= ConfigSystem.GetCommonConf().WVClickAddTime[0] + "|" + ConfigSystem.GetCommonConf().WVClickAddTime[1];
|
||||
|
||||
Debug.Log(add_time);
|
||||
Debug.Log(darkWVRefreshtime_str);
|
||||
Debug.Log(darkWVDailyrefreshtimes_str);
|
||||
Debug.Log(dark_str);
|
||||
Debug.Log(ConfigSystem.web_through_str);
|
||||
WebviewManager.Instance.addH5Field(ConfigSystem.GetCommonConf().flyCtRate, ConfigSystem.GetCommonConf().otherH5switch,
|
||||
ConfigSystem.GetCommonConf().H5Refreshtime, Dailyrefresh_reamain, ConfigSystem.GetCommonConf().darkThoughProbability
|
||||
, darkWVRefreshtime_str, darkWVDailyrefreshtimes_str, dark_str, light_str, GameHelper.IsGiftSwitch(), ConfigSystem.web_through_str, add_time);
|
||||
@@ -704,10 +797,10 @@ namespace DontConfuse
|
||||
{
|
||||
NetApi.SetClickAdEvent<object>(temp_array[0], temp_array[1], (isSuccess, obj) =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
Debug.Log(" click event" + temp_array[0]);
|
||||
}
|
||||
// if (isSuccess)
|
||||
// {
|
||||
// Debug.Log("dadianchenggong" + temp_array[0]);
|
||||
// }
|
||||
});
|
||||
|
||||
}
|
||||
@@ -723,17 +816,13 @@ namespace DontConfuse
|
||||
|
||||
public class H5refreshTimes
|
||||
{
|
||||
[JsonProperty("link")]
|
||||
public string link;
|
||||
[JsonProperty("times")]
|
||||
public int times;
|
||||
|
||||
}
|
||||
public class H5sendClass
|
||||
{
|
||||
[JsonProperty("link")]
|
||||
public string link;
|
||||
[JsonProperty("type")]
|
||||
public string type;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user