bingo b面修改

This commit is contained in:
2026-05-08 11:03:44 +08:00
parent ad5920ac6a
commit 5d32fd56f4
1780 changed files with 36187 additions and 73978 deletions
@@ -7,6 +7,7 @@ using BingoBrain;
using BingoBrain.Core;
using System;
using DG.Tweening;
using BingoBrain.HotFix;
public class AppsFlyerObjectScript1 : MonoBehaviour, IAppsFlyerConversionData
{
@@ -46,7 +47,7 @@ public class AppsFlyerObjectScript1 : MonoBehaviour, IAppsFlyerConversionData
{
if (GameHelper.IsConnect())
{
GameDispatcher.Instance.Dispatch(GameMsg.Network_reconnection);
GameDispatcher.Instance.Dispatch(BingoInfo.Network_reconnection);
}
IsfvKit.StopCoroutine(m_Coroutine);
@@ -42,6 +42,7 @@ public string attribution = "organic";
{
// LastFocusFlaseTime = DateTimeBoardk.Instance.GetServerCurrTimestamp();
AppDispatcher.Instance.Dispatch(CsjInfoC.App_Focus_False, focus);
SaveData.saveDataFunc();
}
}
public override void Init()
+71 -71
View File
@@ -38,15 +38,15 @@ public class LoginSystem : BaseSystem
private void AddListener()
{
NetworkDispatcher.Instance.AddListener(NetworkMsg.Login, OnRequestLogin);
NetworkDispatcher.Instance.AddListener(NetworkMsg.Reconnect, OnResponseReconnect);
// NetworkDispatcher.Instance.AddListener(NetworkMsg.Login, OnRequestLogin);
// NetworkDispatcher.Instance.AddListener(NetworkMsg.Reconnect, OnResponseReconnect);
}
private void RemoveListener()
{
NetworkDispatcher.Instance.RemoveListener(NetworkMsg.Login, OnRequestLogin);
// NetworkDispatcher.Instance.RemoveListener(NetworkMsg.Login, OnRequestLogin);
NetworkDispatcher.Instance.RemoveListener(NetworkMsg.Reconnect, OnResponseReconnect);
// NetworkDispatcher.Instance.RemoveListener(NetworkMsg.Reconnect, OnResponseReconnect);
}
@@ -65,81 +65,81 @@ public class LoginSystem : BaseSystem
Debug.Log(SystemInfo.deviceUniqueIdentifier);
GameHelper.PostFunnelLogin("loginSend");
Debug.Log(JsonConvert.SerializeObject(requestLoginData));
NetworkKit.Post<LoginModel>("login", requestLoginData, (isSuccess, loginData) =>
{
//zhushi // NetworkKit.Post<LoginModel>("login", requestLoginData, (isSuccess, loginData) =>
// {
if (isSuccess)
{
var loginModel = GameHelper.GetLoginModel();
loginModel.cdn_url = loginData.cdn_url;
loginModel.setting = loginData.setting;
loginModel.play_data = loginData.play_data;
loginModel.token = loginData.token;
loginModel.uid = loginData.uid;
loginModel.country = loginData.country;
loginModel.expires_at = loginData.expires_at;
loginModel.is_magic = loginData.is_magic;
loginModel.invite_code = loginData.invite_code;
loginModel.invite_url = loginData.invite_url;
loginModel.last_login_time = loginData.last_login_time;
loginModel.login_time = loginData.login_time;
loginModel.reg_time = loginData.reg_time;
loginModel.new_player = loginData.new_player;
loginModel.debug_log = loginData.debug_log;
loginModel.enwp = loginData.enwp;
// if (isSuccess)
// {
// var loginModel = GameHelper.GetLoginModel();
// loginModel.cdn_url = loginData.cdn_url;
// loginModel.setting = loginData.setting;
// loginModel.play_data = loginData.play_data;
// loginModel.token = loginData.token;
// loginModel.uid = loginData.uid;
// loginModel.country = loginData.country;
// loginModel.expires_at = loginData.expires_at;
// loginModel.is_magic = loginData.is_magic;
// loginModel.invite_code = loginData.invite_code;
// loginModel.invite_url = loginData.invite_url;
// loginModel.last_login_time = loginData.last_login_time;
// loginModel.login_time = loginData.login_time;
// loginModel.reg_time = loginData.reg_time;
// loginModel.new_player = loginData.new_player;
// loginModel.debug_log = loginData.debug_log;
// loginModel.enwp = loginData.enwp;
loginModel.preferences = new Preferences();
NetworkKit.CDNUrl = $"{loginData.cdn_url}/";
NetworkKit.SetCacheToken(loginData.token);
//RequestHeart();
DateTimeBoardk.Instance.SetServerCurrTimestamp(loginData.login_time);
Sequence mLoopSequence = DOTween.Sequence();
mLoopSequence.AppendCallback(() =>
{
RequestHeart();
// loginModel.preferences = new Preferences();
// NetworkKit.CDNUrl = $"{loginData.cdn_url}/";
// NetworkKit.SetCacheToken(loginData.token);
// //RequestHeart();
// DateTimeBoardk.Instance.SetServerCurrTimestamp(loginData.login_time);
// Sequence mLoopSequence = DOTween.Sequence();
// mLoopSequence.AppendCallback(() =>
// {
// RequestHeart();
}).AppendInterval(60).SetLoops(-1);
//TimerHelper.UnscaleGeneral.AddLoopTimer(60, (timer) => { RequestHeart(); });
//NetworkDispatcher.Instance.Dispatch(NetworkMsg.GetPlayData);
//UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open);
PreferencesMgr.Instance.PlayerName = loginData.invite_code;
NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);
MaxADKit.Init();
GameHelper.PostFunnelLogin("loginRecv", true);
if (GameHelper.IsGiftSwitch())
{
GameObject.Find("MainCameraRoot").SetActive(false);
}
else{
GameObject.Find("sheep_parent").SetActive(false);
}
}
else
{
//UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close);
Debug.Log("登陆请求失败");
GameHelper.PostFunnelLogin("loginRecv", false);
// }).AppendInterval(60).SetLoops(-1);
// //TimerHelper.UnscaleGeneral.AddLoopTimer(60, (timer) => { RequestHeart(); });
// //NetworkDispatcher.Instance.Dispatch(NetworkMsg.GetPlayData);
// //UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open);
// PreferencesMgr.Instance.PlayerName = loginData.invite_code;
// NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);
// MaxADKit.Init();
// GameHelper.PostFunnelLogin("loginRecv", true);
// if (GameHelper.IsGiftSwitch())
// {
// GameObject.Find("MainCameraRoot").SetActive(false);
// }
// else{
// GameObject.Find("sheep_parent").SetActive(false);
// }
// }
// else
// {
// //UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close);
// Debug.Log("登陆请求失败");
// GameHelper.PostFunnelLogin("loginRecv", false);
float times = loginCount == 0 ? 0 : 5f;
// float times = loginCount == 0 ? 0 : 5f;
DOVirtual.DelayedCall(times,()=>{
if (loginCount < LoginCountLimit) {
loginCount++;
RequestLogin();
// DOVirtual.DelayedCall(times,()=>{
// if (loginCount < LoginCountLimit) {
// loginCount++;
// RequestLogin();
} else {
loginCount = 0;
Action _OnFail = () =>
{
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
};
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.TipsViewUI_Open, _OnFail);
}
});
}
});
// } else {
// loginCount = 0;
// Action _OnFail = () =>
// {
// NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
// };
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.TipsViewUI_Open, _OnFail);
// }
// });
// }
// });
}
-550
View File
@@ -1,550 +0,0 @@
using UnityEngine;
using BingoBrain;
using DG.Tweening;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Collections;
using UnityEngine.UI;
using System.Linq;
using System;
using BingoBrain.Core;
using BingoBrain;
using BingoBrain.HotFix;
public class MaxPayManager
{
public static readonly MaxPayManager Instance = new MaxPayManager();
public static bool isPay = false;
// public static Dictionary<string, int> statusDictionary = new();
MaxPayManager()
{
}
public static string buy_one = "com.sugar.space.24.99";
// public static string buy_gold_1 = "com.sugar.shop.1.99";
// public static string buy_gold_2 = "com.sugar.shop.3.99";
// public static string buy_gold_3 = "com.sugar.shop.9.99";
// public static string buy_gold_4 = "com.sugar.shop.19.99";
public static string remove_ad = "com.sugar.remove.2.99";
public static string battle_pass = "com.sugar.pass.9.99";
public static string pack_reward = "com.sugar.reward.1.99";
public static string fail_pack = "com.sugar.fail_pack";
public string three_days_gift = "com.bingo.3daygift1.1.99";
public void Buy(MaxPayClass _data)
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Open);
StopPayCoroutine();
SaveData.GetSaveobject().max_pay_object = _data;
MaxPay(_data);
}
/// <summary>
/// 发起第三发支付
/// </summary>
public void MaxPay(MaxPayClass data_)
{
// Debug.Log($"[UNITY] Purchase;;;;;;{JsonConvert.SerializeObject(data_)}");
//is debug test--------测试代码
if (Application.identifier != NetworkMsg.Identifier)
// if (Application.identifier == NetworkMsg.Identifier)
{
MaxPayClass paydata = data_;
SaveData.pay_time = Time.time;
if (data_.sku == buy_one)
{
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.buy_one_click, 1);
}
else if (data_.sku == remove_ad)
{
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.remove_ad_click, 1);
}
else if (data_.sku == pack_reward)
{
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.pack_click, 1);
}
else if (data_.sku.StartsWith("buy_gold"))
{
int startIndex = "buy_gold".Length;
string suffix = paydata.sku[startIndex..]; // 截取 "gold" 后的所有字符
string eventClickName = $"gold_click_{suffix}";
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, eventClickName, 1);
}
else if (data_.sku == battle_pass)
{
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.pass_click, 1);
}
else if (data_.sku == fail_pack)
{
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.fail_click, 1);
}
else if (data_.sku == three_days_gift)
{
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.three_days_gift_click, 1);
}
PayerData test = new PayerData()
{
amount = data_.amount,
};
//max 支付订单创建
NetworkKit.PostWithHeader<orderData>("shop/maxPayIn", test, (isSuccess, obj) =>
{
if (isSuccess)
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
Debug.Log($"max 支付订单创建:{JsonConvert.SerializeObject(obj)}");
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PixPayUI_Open, obj);
SaveData.GetSaveobject().max_pay_object.innerOrderId = obj.order_id;
paydata.status = 1;
SavePayData(obj.order_id, paydata);
isPay = true;
OpenBrowser.OpenURL(obj.pay_url);
}
});
}
else
{
// GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, data_.sku);
}
}
public void SavePayData(string orderId, MaxPayClass payData)
{
// Debug.Log($"max 支付 SavePayData: orderId={orderId} status={payData}");
// 加载已保存的支付数据
var payDataJson = PlayerPrefs.GetString("three_pay_data", "{}");
var statusDictionary = JsonConvert.DeserializeObject<Dictionary<string, MaxPayClass>>(payDataJson);
// Debug.Log($"max 支付 statusDictionary {statusDictionary}");
// 判断是否已有相同的 orderId
if (statusDictionary.ContainsKey(orderId))
{
// Debug.Log($"max 支付 statusDictionary 已存在 orderId {orderId}");
// 更新现有条目的状态
statusDictionary[orderId] = payData;
}
else
{
// 添加新的条目
// Debug.Log($"max 支付 statusDictionary 不存在 orderId {orderId}");
statusDictionary.Add(orderId, payData);
}
// 保存更新后的数据
PlayerPrefs.SetString("three_pay_data", JsonConvert.SerializeObject(statusDictionary));
// Debug.Log($"max 支付 three_pay_data {JsonConvert.SerializeObject(statusDictionary)}");
}
public MaxPayClass GetPayData(string orderId)
{
var payDataJson = PlayerPrefs.GetString("three_pay_data", "{}");
var statusDictionary = JsonConvert.DeserializeObject<Dictionary<string, MaxPayClass>>(payDataJson);
if (statusDictionary.ContainsKey(orderId))
{
return statusDictionary[orderId];
}
return null;
}
public bool GetPayStatus()
{
bool isCheck = false;
var payDataJson = PlayerPrefs.GetString("three_pay_data", "{}");
var statusDictionary = JsonConvert.DeserializeObject<Dictionary<string, MaxPayClass>>(payDataJson);
if (statusDictionary == null) return false;
foreach (var entry in statusDictionary)
{
if (entry.Value.status == 1)
{
isCheck = true;
break;
}
}
return isCheck;
}
private int PayStatus = -1;
private Coroutine PayCoroutine;
public IEnumerator ProcessPayData()
{
var payDataJson = PlayerPrefs.GetString("three_pay_data", "{}");
var statusDictionary = JsonConvert.DeserializeObject<Dictionary<string, MaxPayClass>>(payDataJson);
foreach (var entry in statusDictionary.OrderByDescending(pair => pair.Key))
{
// Debug.Log($"max 支付 ProcessPayData0======{entry.Key} status:{entry.Value}");
if (entry.Value.status == 1)
{
bool keepRequesting = true;
while (keepRequesting)
{
// 发起请求
PaySuccess(entry.Key);
yield return new WaitForSeconds(5f);
// Debug.Log($"max 支付 ProcessPayData1======{entry.Key} status:{PayStatus}");
if (PayStatus == 1)
{
// 如果返回值为1,则等待5秒后再次请求
}
else
{
// 如果返回值不为1,则停止循环
PayStatus = -1;
keepRequesting = false;
}
yield return null; // 等待本次请求完成
}
}
}
}
public void StopPayCoroutine()
{
if (PayCoroutine != null)
{
IsfvKit.StopCoroutine(PayCoroutine);
}
}
public void PaySuccess()
{
Debug.Log("max 支付 StartCoroutine------");
PayCoroutine = IsfvKit.StartCoroutine(ProcessPayData());
}
public void PaySuccess(string orderId)
{
var test = new maxOrder();
test.order_id = orderId;
//max 支付订单查询
NetworkKit.PostWithHeader<orderState>("shop/maxPayOrderQuery", test, (isSuccess, obj) =>
{
Debug.Log($"max 支付订单查询: id= {orderId} is succ={isSuccess}");
if (isSuccess)
{
Debug.Log($"max 支付订单查询: 成功,statu====: {obj.status}");
// Debug.Log($"max 支付订单查询: {JsonConvert.SerializeObject(obj)}");
PayStatus = obj.status;
//1:支付中,需要定时查询
if (obj.status == 1)
{
var paydata = GetPayData(orderId);
if (paydata != null)
{
paydata.status = 1;
SavePayData(obj.order_id, paydata);
}
// reCreatPur();
}
//2:支付成功,发奖
else if (obj.status == 2)
{
var paydata = GetPayData(orderId);
if (paydata != null)
{
paydata.status = 2;
SavePayData(obj.order_id, paydata);
}
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
bool isOpen = false;
if (paydata.sku == buy_one)
{
isOpen = HandleSku(paydata.sku, UIConst.BuyslotUI, BuriedPointEvent.buy_one_open, BuriedPointEvent.buy_one_success);
}
else if (paydata.sku == remove_ad)
{
isOpen = HandleSku(paydata.sku, UIConst.PackrewardUI, BuriedPointEvent.remove_ad_open, BuriedPointEvent.remove_ad_success);
}
else if (paydata.sku == pack_reward)
{
isOpen = HandleSku(paydata.sku, UIConst.PackrewardUI, BuriedPointEvent.pack_open, BuriedPointEvent.pack_success);
}
else if (paydata.sku.StartsWith("buy_gold"))
{
int startIndex = "buy_gold".Length;
string suffix = paydata.sku[startIndex..]; // 截取 "gold" 后的所有字符
string eventOpenName = $"gold_open_{suffix}";
string eventSuccessName = $"gold_success_{suffix}";
isOpen = HandleSku(paydata.sku, UIConst.BuygoldUI, eventOpenName, eventSuccessName);
}
else if (paydata.sku == battle_pass)
{
isOpen = HandleSku(paydata.sku, UIConst.NewTaskUI, BuriedPointEvent.pass_open, BuriedPointEvent.pass_success);
}
else if (paydata.sku == fail_pack)
{
isOpen = HandleSku(paydata.sku, UIConst.PackrewardUI, BuriedPointEvent.fail_show, BuriedPointEvent.fail_buy_success); ;
}
else if (paydata.sku == three_days_gift)
{
isOpen = HandleSku(paydata.sku, UIConst.ThreeDaysGiftUI, BuriedPointEvent.three_days_gift_show, BuriedPointEvent.three_days_gift_buy_success);
}
else
{
// 处理未知的 sku 值
Debug.LogError($"Unknown SKU: {paydata.sku}");
throw new ArgumentException("Unknown SKU");
}
// if (isOpen) {
GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, paydata.sku);
// } else {
// GetPayPrice(paydata);
// }
SaveingPotClass taskData = SaveData.GetSaveobject().saveingpot_history.Last();
makeup_2 makeupVo = ConfigSystem.GetConfig<MakeupModel_2>().GetData(taskData.tableId);
SaveData.GetSaveobject().saveingpot_cash += ((float)paydata.amount) / 100 * makeupVo.PayIncrease; ;
if (ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1 && GameHelper.IsGiftSwitch())
{
if ((SaveData.GetSaveobject().saveingpot_cash > taskData.amount) && (!taskData.auto_show) && !UI.Instance.IsExistUI(UIConst.H5UI))
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SaveingPotUI_Open);
taskData.auto_show = true;
}
}
GameDispatcher.Instance.Dispatch(GameMsg.RefreshSaveingPot);
DOVirtual.DelayedCall(1, () =>
{
SaveData.GetSaveobject().max_pay_object = null;
var paydata = GetPayData(orderId);
if (paydata != null)
{
paydata.status = 4;
SavePayData(obj.order_id, paydata);
}
});
}
//3:支付失败,已领奖或者支付失败,或者查询次数达到上限
else if (obj.status == 3)
{
var paydata = GetPayData(orderId);
if (paydata != null)
{
paydata.status = 3;
SavePayData(obj.order_id, paydata);
}
OnPayFailed(orderId);
}
//4:已发货,服务端记录已经发过奖,若客户端未发奖可发奖
else
{
DOVirtual.DelayedCall(1, () =>
{
var paydata = GetPayData(orderId);
if (paydata != null)
{
paydata.status = 4;
SavePayData(obj.order_id, paydata);
}
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
SaveData.GetSaveobject().max_pay_object = null;
GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, paydata.sku);
});
}
}
else
{
// Debug.Log("max 支付 验证订单失败");
// Debug.Log($"max 支付 验证订单失败: {JsonConvert.SerializeObject(obj)}");
//验证订单失败
// reCreatPur();
// status = -1;
PayStatus = -1;
}
});
}
bool HandleSku(string sku, string uiConst, string openEvent, string successEvent)
{
bool isOpen;
try
{
isOpen = CheckIsOpen(uiConst);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, openEvent, 1);
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, successEvent, 1);
}
catch (Exception ex)
{
// 记录异常信息
Debug.LogError($"Error handling SKU {sku}: {ex.Message}");
// 可以选择重新抛出异常或进行其他处理
throw;
}
return isOpen;
}
public void reCreatPur()//重新验证订单
{
// Debug.Log($"max 支付 reCreatPur 重新验证订单: pay_object_data===: {JsonConvert.SerializeObject(SaveData.GetSaveobject().max_pay_object)}");
// if (SaveData.GetSaveobject().max_pay_object != null)
// {
// CrazyAsyKit.StartCoroutine(ProcessPayData());
// }
}
public void OnPayFailed(string orderId)
{
var paydata = GetPayData(orderId);
if (paydata == null)
{
return;
}
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
// Debug.LogWarning("OnPurchaseFailedproduct:" + product.transactionID + " failureReason:" + failureReason);
DOVirtual.DelayedCall(1, () =>
{
SaveData.GetSaveobject().max_pay_object = null;
});
}
private bool CheckIsOpen(string name)
{
var isOpen = UI.Instance.IsExistUI(name);
return isOpen;
}
//适用这个方法领奖,说明购买界面已经关闭
private void GetPayPrice(MaxPayClass paydata)
{
decimal rewardNum = 0;
if (paydata.sku == buy_one)
{
SaveData.GetSaveobject().have_slot = true;
}
else if (paydata.sku == remove_ad)
{
var list = ConfigSystem.GetConfig<PaidgiftModel>().dataList;
if (list.Count > 0)
{
rewardNum = list[1].coins_quantity;
}
//标记已经购买过
SaveData.GetSaveobject().is_get_packreward = true;
}
else if (paydata.sku == pack_reward)
{
var list = ConfigSystem.GetConfig<PaidgiftModel>().dataList;
if (list.Count > 0)
{
rewardNum = list[0].coins_quantity;
}
//标记已经购买过
SaveData.GetSaveobject().is_get_removead = true;
}
else if (paydata.sku.StartsWith("buy_gold"))
{
int startIndex = "buy_gold".Length;
string suffix = paydata.sku[startIndex..]; // 截取 "gold" 后的所有字符
rewardNum = GetGoldRewradNum(int.Parse(suffix));
}
else if (paydata.sku == battle_pass)
{
//标记已经购买过
SaveData.GetSaveobject().is_get_battlepass = true;
}
if (rewardNum > 0)
{
GetPayReward(rewardNum);
}
}
private static decimal GetGoldRewradNum(int index)
{
decimal rewardNum = 0;
var list = ConfigSystem.GetConfig<PaidcoinsModel>().dataList;
if (list.Count > 0 && list.Count > index)
{
rewardNum = list[index].Actual_coins;
}
return rewardNum;
}
private void GetPayReward(decimal goldNum)
{
if (goldNum == 0) return;
var start = new Vector2(540, 960);
var rewardData = new RewardData();
var rewardSingleData = new Goda(101, goldNum, RewardOrigin.AdTask)
{
startPosition = start,
};
rewardData.AddReward(rewardSingleData);
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
}
}
public class maxOrder
{
public string order_id;
}
public class MaxPayClass
{
public string innerOrderId;
public int amount;
public string sku;
public string currency = "USD";
public int status;
}
public class PayerData
{
public string name;
public string tel;
public string email;
public int amount;
}
//orderState 是返回对象的类型
public class orderState
{
public string order_id;
public int status;
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2666fefcd878c49c8937ca7b17b328f6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+10 -10
View File
@@ -39,10 +39,10 @@ public class NetworkKit
var requestJson = SerializeUtil.ToJsonIndented(requestData);
var url2 = url;
#if BingoBrainRelease
// #if BingoBrainRelease
url2 = Base64Kit.Encode(url);
requestJson = Base64Kit.Encode(requestJson);
#endif
// #endif
var bytes = Encoding.UTF8.GetBytes(requestJson);
var url1 = BingoBrain.Network.domainUrl + url2;
//Debug.Log($"Url: {url1}");
@@ -69,14 +69,14 @@ public class NetworkKit
else
{
var receiveContent = loginRequest.downloadHandler.text;
#if BingoBrainRelease
// #if BingoBrainRelease
if (!receiveContent.IsNullOrWhiteSpace())
{
receiveContent = receiveContent.Substring(0, receiveContent.Length - 1);
receiveContent = receiveContent.Substring(1);
receiveContent = Base64Kit.Decode(receiveContent);
}
#endif
// #endif
//Debug.Log(url + "--------" + loginRequest.downloadHandler.text);
//Debug.Log(url + "--------" + receiveContent);
@@ -242,12 +242,12 @@ public class NetworkKit
buriedPointObject.@event = eventname;
buriedPointObject.property = eventproperty;
buriedPointObject.n = integer;
PostWithHeader<BuriedPointObject>("/event/incrN", buriedPointObject, (isSuccess, obj) =>
{
// Debug.Log(isSuccess);
// Debug.Log(eventproperty);
//Debug.Log(JsonUtility.ToJson(obj));
});
// PostWithHeader<BuriedPointObject>("/event/incrN", buriedPointObject, (isSuccess, obj) =>
// {
// // Debug.Log(isSuccess);
// // Debug.Log(eventproperty);
// //Debug.Log(JsonUtility.ToJson(obj));
// });zhushi
}
public static BuriedPointObject buriedPointObject = new BuriedPointObject();
+3 -3
View File
@@ -10,12 +10,12 @@ namespace BingoBrain.Core
public class MaxADKit
{
public static string SDKKey =
"oXM0CzVDi7P1HstOpKvFMInPMOzpQ9uA6t3x75q5f5wQvsEy9vuiiiM94ZJCJSV7PcZGroSSInQCTGsu04QEiE";
"LHx_tPFslZpTTiIPABmS24T7Ev1QEVOUVOzirpkxLUuTwJTVZGCKAk9L3Tm3FwuM5LxHK3q1EIbAemJB5sNpX2";
public static string interstitialADUnitID = "21affa11ba855911";
public static string interstitialADUnitID = "af1076054c8eb56f";
public static string rewardedADUnitID = "a9798351db2bf7e5";
public static string rewardedADUnitID = "d79c2aa7b6ad055d";
private const float RevenueThreshold = 0.1f;
@@ -380,6 +380,7 @@ namespace BingoBrain.Core
// {
BetKit.Instance.LoadAsset<TextAsset>("FGUI", $"{packageName}_fui.bytes", textAsset =>
{
Debug.Log(packageName);
UIPackage.AddPackage(textAsset.bytes, packageName,
delegate(string s, string extension, Type type, out DestroyMethod destroyMethod)
{
+114 -114
View File
@@ -532,7 +532,7 @@ namespace DontConfuse
if (Physics.Raycast(ray, out hit, Mathf.Infinity, layerMask))
{
GameDispatcher.Instance.Dispatch(GameMsg.card_click, hit.collider.gameObject.name);
// GameDispatcher.Instance.Dispatch(GameMsg.card_click, hit.collider.gameObject.name);
}
}
@@ -555,149 +555,149 @@ 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(true));
// 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(true));
// 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;
// }
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>().darkWVRefreshtime2.Length; i++)
{
darkWVRefreshtime_str += "|";
darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2[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>().WVClickCTAddTime1[0] + "|" +
// ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime1[1] + "|" + ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime2[0] + "|" + ConfigSystem.GetConfig<CommonModel>().WVClickCTAddTime2[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);