fix:更换sdk,修复bug
This commit is contained in:
@@ -11,6 +11,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using RedHotRoast;
|
||||
using SDK_IAP;
|
||||
using SGModule.Net;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Purchasing;
|
||||
|
||||
@@ -224,7 +225,7 @@ namespace RedHotRoast
|
||||
Debug.Log("[IAP IOS] 恢复购买流程完成(实际恢复内容通过 OnDeliver 发放)");
|
||||
Debug.Log("[IAP IOS] restore success: " + result.success);
|
||||
GameHelper.ShowTips("Restore_pur", true);
|
||||
// SaveData.GetSaveObject().have_slot = success;
|
||||
// SaveData.GetSaveObject().have_slot = result.success;
|
||||
// DataMgr.VipLevel.Value = 3;
|
||||
// DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + 7 * 24 * 60 * 60;
|
||||
}
|
||||
@@ -247,7 +248,7 @@ namespace RedHotRoast
|
||||
{
|
||||
IAPManager.CheckEntitlement(productId, status =>
|
||||
{
|
||||
Debug.Log($"[IAP IOS] {productName} 权益状态: {status}");
|
||||
Debug.Log($"[IAP IOS] {productId} 权益状态: {status}");
|
||||
onResult?.Invoke(status);
|
||||
});
|
||||
}
|
||||
@@ -260,6 +261,7 @@ namespace RedHotRoast
|
||||
if (state == EntitlementStatus.FullyEntitled)
|
||||
{
|
||||
// 激活加一格权限
|
||||
SaveData.GetSaveObject().have_slot = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -267,11 +269,27 @@ namespace RedHotRoast
|
||||
/// <summary>检查VIP订阅权益</summary>
|
||||
public void CheckVipEntitlement()
|
||||
{
|
||||
CheckEntitlement(PRODUCT_VIP_YEAR, "VIP年卡", status =>
|
||||
{
|
||||
if (status == EntitlementStatus.FullyEntitled)
|
||||
{
|
||||
// 激活年VIP权限
|
||||
}
|
||||
});
|
||||
|
||||
CheckEntitlement(PRODUCT_VIP_MONTH, "VIP月卡", status =>
|
||||
{
|
||||
if (status == EntitlementStatus.FullyEntitled)
|
||||
{
|
||||
// 激活VIP权限
|
||||
// 激活月VIP权限
|
||||
}
|
||||
});
|
||||
|
||||
CheckEntitlement(PRODUCT_VIP_WEEK, "VIP周卡", status =>
|
||||
{
|
||||
if (status == EntitlementStatus.FullyEntitled)
|
||||
{
|
||||
// 激活周VIP权限
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace RedHotRoast
|
||||
{
|
||||
// Debug.Log("OnclickSpace");
|
||||
#if !UNITY_EDITOR
|
||||
MaxSdk.ShowMediationDebugger();
|
||||
// MaxSdk.ShowMediationDebugger();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -210,9 +210,6 @@ namespace RedHotRoast
|
||||
}
|
||||
void Setbg(object a = null)
|
||||
{
|
||||
return;
|
||||
|
||||
|
||||
if (!GameHelper.IsGiftSwitch())
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace RedHotRoast
|
||||
{
|
||||
AdExchangeManager.Instance.Destroy();
|
||||
GameHelper.showGameUI = true;
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent -= RemoveAdCountDown;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.pack_close);
|
||||
int three_gift_got_index = SaveData.GetSaveObject().three_gift_got_index;
|
||||
// if (GameHelper.isAutoPop && (three_gift_got_index <= (int)rewardState.day3))
|
||||
@@ -235,7 +235,7 @@ namespace RedHotRoast
|
||||
decimal price_pack = (decimal)list[0].Paid_price2;
|
||||
ui.btn_max_pack.title = GameHelper.Get102Str(price_pack);
|
||||
bool is_get = SaveData.GetSaveObject().is_get_packreward;
|
||||
Debug.Log($"is_get================{is_get}");
|
||||
// Debug.Log($"is_get================{is_get}");
|
||||
if (is_get)
|
||||
{
|
||||
ui.btn_max_pack.enabled = false;
|
||||
@@ -258,7 +258,7 @@ namespace RedHotRoast
|
||||
decimal price_remove = (decimal)list[1].Paid_price2;
|
||||
ui.btn_max_remove.title = GameHelper.Get102Str(price_remove);
|
||||
bool is_get1 = SaveData.GetSaveObject().is_get_removead;
|
||||
Debug.Log($"is_get1================{is_get1}");
|
||||
// Debug.Log($"is_get1================{is_get1}");
|
||||
if (is_get1)
|
||||
{
|
||||
HallManager.Instance.UpdateSecondEvent += RemoveAdCountDown;
|
||||
@@ -276,6 +276,7 @@ namespace RedHotRoast
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.btn_max_remove.enabled = true;
|
||||
ui.btn_max_remove.SetClick(() =>
|
||||
{
|
||||
ApplePayClass maxPayData = new ApplePayClass
|
||||
@@ -293,6 +294,8 @@ namespace RedHotRoast
|
||||
ui.pay_type.selectedIndex = 0;
|
||||
AdExchangeManager.Instance.Start();
|
||||
SetTextString1();
|
||||
|
||||
|
||||
|
||||
decimal price_remove = (decimal)list[1].Paid_price2;
|
||||
bool is_get1 = SaveData.GetSaveObject().is_get_removead;
|
||||
@@ -300,24 +303,11 @@ namespace RedHotRoast
|
||||
if (is_get1)
|
||||
{
|
||||
HallManager.Instance.UpdateSecondEvent += RemoveAdCountDown;
|
||||
|
||||
ui.btn_buyremovead.enabled = false;
|
||||
ui.btn_buyremovead.SetClick(() => { });
|
||||
|
||||
var lastTimes = SaveData.GetSaveObject()._watch_ad_cd;
|
||||
if (GameHelper.GetNowTime() < lastTimes)
|
||||
{
|
||||
|
||||
}
|
||||
int cd = SaveData.GetSaveObject().remove_ad_time - Convert.ToInt32(GameHelper.GetNowTime());
|
||||
if (cd > 24 * 3600)
|
||||
{
|
||||
ui.btn_buyremovead.title = CommonHelper.TimeFormat(cd, CountDownType.Day, "D");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.btn_buyremovead.title = CommonHelper.TimeFormat(cd, CountDownType.Hour);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.btn_buyremovead1.visible = false;
|
||||
ui.btn_buyremovead.visible = true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -327,23 +317,29 @@ namespace RedHotRoast
|
||||
private void RemoveAdCountDown()
|
||||
{
|
||||
int cd = SaveData.GetSaveObject().remove_ad_time - Convert.ToInt32(GameHelper.GetNowTime());
|
||||
Debug.Log($"cd=========={cd}");
|
||||
if (cd > 0)
|
||||
{
|
||||
ui.btn_buyremovead1.visible = true;
|
||||
ui.btn_buyremovead.visible = false;
|
||||
((btn_watchAd)ui.btn_buyremovead1).can_buy.selectedIndex = 1;
|
||||
if (cd > 24 * 3600)
|
||||
{
|
||||
ui.btn_max_remove.title = CommonHelper.TimeFormat(cd, CountDownType.Day, "D");
|
||||
ui.btn_buyremovead.title = CommonHelper.TimeFormat(cd, CountDownType.Day, "D");
|
||||
((btn_watchAd)ui.btn_buyremovead1).btn_text.text = CommonHelper.TimeFormat(cd, CountDownType.Day, "D");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.btn_max_remove.title = CommonHelper.TimeFormat(cd, CountDownType.Hour);
|
||||
ui.btn_buyremovead.title = CommonHelper.TimeFormat(cd, CountDownType.Hour);
|
||||
((btn_watchAd)ui.btn_buyremovead1).btn_text.text = CommonHelper.TimeFormat(cd, CountDownType.Hour);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveData.GetSaveObject().is_get_removead = false;
|
||||
SaveData.GetSaveObject().remove_ad_time = 0;
|
||||
ui.btn_buyremovead1.visible = false;
|
||||
ui.btn_buyremovead.visible = true;
|
||||
InitView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1041,7 +1041,7 @@ namespace RedHotRoast
|
||||
CheckFeature();
|
||||
if (GameHelper.IsGiftSwitch() && GameHelper.GetCommonModel().Assitant == 1 && GameHelper.GetLevel() >= GameHelper.GetCommonModel().AssitantPreview)
|
||||
{
|
||||
ui.btn_chat.visible = true;
|
||||
// ui.btn_chat.visible = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -248,10 +248,10 @@ namespace RedHotRoast
|
||||
bool is_paid = list[index].is_paid;
|
||||
item.btn_buy.index.selectedIndex = 0;
|
||||
|
||||
// item.off_text.text = list[index].Discount_rate + "%";
|
||||
// item.discount.visible = !GameHelper.IsAdModelOfPay() && list[index].Discount_rate > 0;
|
||||
//
|
||||
// if (list[index].Discount_rate != 0) item.off_text.text = list[index].Discount_rate + "%";
|
||||
item.off_text.text = list[index].Discount_rate + "%";
|
||||
item.discount.visible = !GameHelper.IsAdModelOfPay() && list[index].Discount_rate > 0;
|
||||
|
||||
if (list[index].Discount_rate != 0) item.off_text.text = list[index].Discount_rate + "%";
|
||||
|
||||
if (time + list[index].receive_CD < GameHelper.GetNowTime())
|
||||
{
|
||||
@@ -263,7 +263,7 @@ namespace RedHotRoast
|
||||
if (!is_paid)
|
||||
{
|
||||
item.btn_buy.btn_text.text = "Free";
|
||||
// item.discount.visible = false;
|
||||
item.discount.visible = false;
|
||||
item.index.selectedIndex = 0;
|
||||
}
|
||||
else
|
||||
@@ -384,9 +384,10 @@ namespace RedHotRoast
|
||||
var test = new AdExchangeData()
|
||||
{
|
||||
ad_count = AdExchangeManager.Instance.GetCeilingNeedAds(skuType),
|
||||
type = $"buy_gold{index}",
|
||||
type = skuType,
|
||||
shopName = $"buy_gold{index}"
|
||||
};
|
||||
Debug.Log($"amount============={test.ad_count}");
|
||||
AdExchangeManager.Instance.Exchange(test);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -269,8 +269,14 @@ namespace RedHotRoast
|
||||
DataMgr.LevelUnlockVIP.Value = Vip_Alubum;
|
||||
}
|
||||
|
||||
|
||||
FreeImageLibrary free_ImageLibrary = ConfigSystem.GetFreeImageConfig()[DataMgr.LevelUnlockFree.Value];
|
||||
Debug.Log($"DataMgr.LevelUnlockFree.Value----------------{DataMgr.LevelUnlockFree.Value}");
|
||||
var freeIamgeList = ConfigSystem.GetFreeImageConfig();
|
||||
var freeIndex = DataMgr.LevelUnlockFree.Value;
|
||||
if (freeIndex < 0 || freeIndex >= freeIamgeList.Count)
|
||||
{
|
||||
freeIndex = freeIndex < 0 ? 0 : freeIamgeList.Count - 1;
|
||||
}
|
||||
FreeImageLibrary free_ImageLibrary = ConfigSystem.GetFreeImageConfig()[freeIndex];
|
||||
ui.item_0.btn_unlock.pay_type.selectedIndex = 2;
|
||||
ui.item_0_re.btn_unlock.visible = false;
|
||||
TextureHelper.SetImgLoader(ui.item_0.com_pic.picture, free_ImageLibrary.Name, (s) =>
|
||||
@@ -279,6 +285,15 @@ namespace RedHotRoast
|
||||
}, "LevelAlbums/", FolderNames.AlbumName);
|
||||
|
||||
int Free_Alubum_1 = PlayerPrefs.GetInt("Free_Alubum_1", -1);
|
||||
var freeImageLibraryList = ConfigSystem.GetFreeImageConfig();
|
||||
if (Free_Alubum_1 < 0)
|
||||
{
|
||||
Free_Alubum_1 = 0;
|
||||
}
|
||||
else if (Free_Alubum_1 >= freeImageLibraryList.Count)
|
||||
{
|
||||
Free_Alubum_1 = freeImageLibraryList.Count - 1;
|
||||
}
|
||||
FreeImageLibrary free_ImageLibrary_re = ConfigSystem.GetFreeImageConfig()[Free_Alubum_1];
|
||||
TextureHelper.SetImgLoader(ui.item_0_re.com_pic.picture, free_ImageLibrary_re.Name, (s) =>
|
||||
{
|
||||
@@ -315,7 +330,13 @@ namespace RedHotRoast
|
||||
|
||||
|
||||
|
||||
ADImageLibrary ad_ImageLibrary = ConfigSystem.GetADImageConfig()[DataMgr.LevelUnlockAD.Value];
|
||||
var adImageLibraryList = ConfigSystem.GetADImageConfig();
|
||||
int adIndex = DataMgr.LevelUnlockAD.Value;
|
||||
if (adIndex < 0 || adIndex >= adImageLibraryList.Count)
|
||||
{
|
||||
adIndex = adIndex < 0 ? 0 : adImageLibraryList.Count - 1;
|
||||
}
|
||||
ADImageLibrary ad_ImageLibrary = ConfigSystem.GetADImageConfig()[adIndex];
|
||||
TextureHelper.SetImgLoader(ui.item_1.com_pic.picture, ad_ImageLibrary.Name, (s) =>
|
||||
{
|
||||
if (ad_ImageLibrary.State == 1) TextureHelper.SetImageBlur(ui.item_1.com_pic.picture);
|
||||
@@ -336,12 +357,21 @@ namespace RedHotRoast
|
||||
});
|
||||
|
||||
|
||||
var specialImageLibraryList = ConfigSystem.GetSpecialImageConfig();
|
||||
var specialIndex = DataMgr.LevelUnlockSpecial.Value;
|
||||
if (specialIndex < 0 || specialIndex >= specialImageLibraryList.Count)
|
||||
{
|
||||
specialIndex = specialIndex < 0 ? 0 : specialImageLibraryList.Count - 1;
|
||||
}
|
||||
bool have_special = GameHelper.GetVipPrivilege(Subscription.SLVLevel.As<int>());
|
||||
SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetSpecialImageConfig()[DataMgr.LevelUnlockSpecial.Value];
|
||||
SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetSpecialImageConfig()[specialIndex];
|
||||
TextureHelper.SetImgLoader(ui.item_2.com_pic.picture, special_ImageLibrary.Name, (s) =>
|
||||
{
|
||||
if (special_ImageLibrary.State == 1 && !have_special) TextureHelper.SetImageBlur(ui.item_2.com_pic.picture);
|
||||
}, "LevelAlbums/", FolderNames.AlbumName);
|
||||
|
||||
Debug.Log($"DataMgr.LevelUnlockSpecial.Value======{DataMgr.LevelUnlockSpecial.Value} {have_special}");
|
||||
|
||||
if (have_special)
|
||||
{
|
||||
ui.item_2.btn_unlock.visible = false;
|
||||
@@ -389,7 +419,13 @@ namespace RedHotRoast
|
||||
}
|
||||
|
||||
bool have_vip = GameHelper.GetVipPrivilege(Subscription.VipLevel.As<int>());
|
||||
VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetVIPImageConfig()[DataMgr.LevelUnlockVIP.Value];
|
||||
var vipImageLibraryList = ConfigSystem.GetVIPImageConfig();
|
||||
var vipIndex = DataMgr.LevelUnlockVIP.Value;
|
||||
if (vipIndex < 0 || vipIndex >= vipImageLibraryList.Count)
|
||||
{
|
||||
vipIndex = vipIndex < 0 ? 0 : vipImageLibraryList.Count - 1;
|
||||
}
|
||||
VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetVIPImageConfig()[vipIndex];
|
||||
|
||||
TextureHelper.SetImgLoader(ui.item_3.com_pic.picture, vip_ImageLibrary.Name, (s) =>
|
||||
{
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace RedHotRoast
|
||||
|
||||
public int this_time_cardtype;
|
||||
|
||||
public int[] dark_Dayref;
|
||||
public List<int> dark_Dayref;
|
||||
|
||||
public ApplePayClass max_pay_object;
|
||||
public List<SaveingPotClass> saveingpot_history = new List<SaveingPotClass>();
|
||||
|
||||
@@ -164,18 +164,21 @@ namespace RedHotRoast {
|
||||
{
|
||||
bool b = false;
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && SuperApplication.Instance.attribution == "organic")
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
b = GetCommonConf().IsOrganic == 1;
|
||||
if (SuperApplication.Instance.attribution == "organic")
|
||||
{
|
||||
b = GetCommonConf().non == 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Debug.Log($"下载---------开关:{b}");
|
||||
// Debug.Log($"下载---------开关:{b} non: {GetCommonConf().non}");
|
||||
return b;
|
||||
}
|
||||
|
||||
private static List<T> GetConfigWithOrganicFallback<T, TOrganic>() where T : class
|
||||
{
|
||||
if (!IsOrganic())
|
||||
if (IsOrganic())
|
||||
{
|
||||
var organicConfig = ConfigLoader.Instance.GetConfig<List<TOrganic>>();
|
||||
if (organicConfig != null)
|
||||
@@ -187,10 +190,10 @@ namespace RedHotRoast {
|
||||
|
||||
return GetConfig<T>();
|
||||
}
|
||||
|
||||
|
||||
public static string GetConfigResVersion()
|
||||
{
|
||||
return IsOrganic() ? GetCommonConf().ResVersion : GetCommonConf().ResVersion1;
|
||||
return IsOrganic() ? GetCommonConf().ResVersion1 : GetCommonConf().ResVersion;
|
||||
}
|
||||
|
||||
public static List<Live> GetLiveConfig()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using DG.Tweening;
|
||||
using SGModule.NetKit;
|
||||
using TCJPLYRM1xJTSDK;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
@@ -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