fix:1、sdk更换。2、修复bug
This commit is contained in:
@@ -92,6 +92,7 @@ namespace IgnoreOPS
|
||||
|
||||
public string X_Redeemcode;
|
||||
public string X_ShopURL;
|
||||
public int StatementSwitch;
|
||||
|
||||
|
||||
public CommonModel(string key) : base(key)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using SGModule.ConfigLoader;
|
||||
|
||||
namespace IgnoreOPS
|
||||
{
|
||||
public class ExchangeRateModel : ConfigModel<ExchangeRateModel, ExchangeRate>
|
||||
{
|
||||
public ExchangeRateModel(string key) : base(key)
|
||||
{
|
||||
}
|
||||
}
|
||||
public class ExchangeRate
|
||||
{
|
||||
public int ID;
|
||||
public List<string> CountryKey;
|
||||
public float Multi;
|
||||
public string Payicon;
|
||||
public string Currency;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d752db403aea40898931f762a1a83e5b
|
||||
timeCreated: 1783386736
|
||||
@@ -8,6 +8,7 @@ namespace FGUI.Login_05
|
||||
public partial class com_login_privacy : GComponent
|
||||
{
|
||||
public GRichTextField text_privacy_user;
|
||||
public GRichTextField text_privacy_user1;
|
||||
public const string URL = "ui://8u2p5uv6opwg8";
|
||||
|
||||
public static com_login_privacy CreateInstance()
|
||||
@@ -20,6 +21,7 @@ namespace FGUI.Login_05
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
text_privacy_user = (GRichTextField)GetChildAt(2);
|
||||
text_privacy_user1 = (GRichTextField)GetChildAt(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,8 +50,10 @@ namespace FGUI.tixian
|
||||
public cash_levelcom com_chlevel;
|
||||
public GGroup group_;
|
||||
public GTextField lab_mn;
|
||||
public GTextField text_rate1;
|
||||
public GList list_kicket;
|
||||
public GTextField lab_mn2;
|
||||
public GTextField text_rate;
|
||||
public GTextField lab_ticket;
|
||||
public GTextField lab_code;
|
||||
public btn_code btn_copy;
|
||||
@@ -116,8 +118,10 @@ namespace FGUI.tixian
|
||||
com_chlevel = (cash_levelcom)GetChildAt(60);
|
||||
group_ = (GGroup)GetChildAt(61);
|
||||
lab_mn = (GTextField)GetChildAt(65);
|
||||
text_rate1 = (GTextField)GetChildAt(68);
|
||||
list_kicket = (GList)GetChildAt(70);
|
||||
lab_mn2 = (GTextField)GetChildAt(75);
|
||||
text_rate = (GTextField)GetChildAt(78);
|
||||
lab_ticket = (GTextField)GetChildAt(83);
|
||||
lab_code = (GTextField)GetChildAt(85);
|
||||
btn_copy = (btn_code)GetChildAt(86);
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace FGUI.tixian
|
||||
public btn_top btn_level1;
|
||||
public btn_top btn_level2;
|
||||
public GGroup group_;
|
||||
public GTextField text_title_2;
|
||||
public GTextField text_smaill_title;
|
||||
public com_enter com_info;
|
||||
public com_firstname com_fname;
|
||||
@@ -40,8 +39,10 @@ namespace FGUI.tixian
|
||||
public btn_pay btn_watch;
|
||||
public GImage card_;
|
||||
public GTextField lab_mn;
|
||||
public GTextField text_rate1;
|
||||
public GList list_kicket;
|
||||
public GTextField lab_mn2;
|
||||
public GTextField text_rate;
|
||||
public GTextField lab_ticket;
|
||||
public GTextField lab_code;
|
||||
public btn_code btn_copy;
|
||||
@@ -81,31 +82,32 @@ namespace FGUI.tixian
|
||||
btn_level1 = (btn_top)GetChildAt(22);
|
||||
btn_level2 = (btn_top)GetChildAt(23);
|
||||
group_ = (GGroup)GetChildAt(24);
|
||||
text_title_2 = (GTextField)GetChildAt(25);
|
||||
text_smaill_title = (GTextField)GetChildAt(26);
|
||||
com_info = (com_enter)GetChildAt(27);
|
||||
com_fname = (com_firstname)GetChildAt(28);
|
||||
com_lname = (com_lastname)GetChildAt(29);
|
||||
com_pay = (com_info)GetChildAt(30);
|
||||
text_smaill_title_2 = (GTextField)GetChildAt(31);
|
||||
text_ch = (GTextField)GetChildAt(34);
|
||||
text_account = (GTextField)GetChildAt(35);
|
||||
com_task = (com_task)GetChildAt(38);
|
||||
com_newRecord = (com_newRecord)GetChildAt(39);
|
||||
btn_watch = (btn_pay)GetChildAt(40);
|
||||
card_ = (GImage)GetChildAt(42);
|
||||
lab_mn = (GTextField)GetChildAt(45);
|
||||
list_kicket = (GList)GetChildAt(51);
|
||||
lab_mn2 = (GTextField)GetChildAt(55);
|
||||
lab_ticket = (GTextField)GetChildAt(62);
|
||||
lab_code = (GTextField)GetChildAt(64);
|
||||
btn_copy = (btn_code)GetChildAt(65);
|
||||
btn_contact_us = (btn_code)GetChildAt(66);
|
||||
btn_back = (GButton)GetChildAt(70);
|
||||
btn_task_watch = (GButton)GetChildAt(75);
|
||||
btn_inline_ok = (btn_get)GetChildAt(76);
|
||||
broad = (com_broadcast)GetChildAt(77);
|
||||
btn_close = (GButton)GetChildAt(78);
|
||||
text_smaill_title = (GTextField)GetChildAt(25);
|
||||
com_info = (com_enter)GetChildAt(26);
|
||||
com_fname = (com_firstname)GetChildAt(27);
|
||||
com_lname = (com_lastname)GetChildAt(28);
|
||||
com_pay = (com_info)GetChildAt(29);
|
||||
text_smaill_title_2 = (GTextField)GetChildAt(30);
|
||||
text_ch = (GTextField)GetChildAt(33);
|
||||
text_account = (GTextField)GetChildAt(34);
|
||||
com_task = (com_task)GetChildAt(37);
|
||||
com_newRecord = (com_newRecord)GetChildAt(38);
|
||||
btn_watch = (btn_pay)GetChildAt(39);
|
||||
card_ = (GImage)GetChildAt(41);
|
||||
lab_mn = (GTextField)GetChildAt(44);
|
||||
text_rate1 = (GTextField)GetChildAt(46);
|
||||
list_kicket = (GList)GetChildAt(50);
|
||||
lab_mn2 = (GTextField)GetChildAt(54);
|
||||
text_rate = (GTextField)GetChildAt(56);
|
||||
lab_ticket = (GTextField)GetChildAt(61);
|
||||
lab_code = (GTextField)GetChildAt(63);
|
||||
btn_copy = (btn_code)GetChildAt(64);
|
||||
btn_contact_us = (btn_code)GetChildAt(65);
|
||||
btn_back = (GButton)GetChildAt(69);
|
||||
btn_task_watch = (GButton)GetChildAt(74);
|
||||
btn_inline_ok = (btn_get)GetChildAt(75);
|
||||
broad = (com_broadcast)GetChildAt(76);
|
||||
btn_close = (GButton)GetChildAt(77);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using DG.Tweening;
|
||||
using Spine.Unity;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Random = UnityEngine.Random;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
@@ -377,6 +378,32 @@ namespace ChillConnect
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
public static ExchangeRate GetExchangeRateVo()
|
||||
{
|
||||
var code = "JP";//GetCurrCountry();
|
||||
var voList = ConfigSystem.GetConfig<ExchangeRateModel>().DataList;
|
||||
foreach (var exchangeRateVo in voList.Where(exchangeRateVo => exchangeRateVo.CountryKey.Contains(code)))
|
||||
{
|
||||
return exchangeRateVo;
|
||||
}
|
||||
return voList[0];
|
||||
}
|
||||
|
||||
public static string GetCurrCountry()
|
||||
{
|
||||
string countryCode = "US";
|
||||
try
|
||||
{
|
||||
countryCode = RegionInfo.CurrentRegion.TwoLetterISORegionName;
|
||||
Debug.Log("国家代码: " + countryCode); // 例如:US, CN, JP, DE 等
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogError("无法获取国家代码: " + e.Message);
|
||||
}
|
||||
return countryCode.ToUpper();
|
||||
}
|
||||
|
||||
public static string GetPlayerInviteCode()
|
||||
{
|
||||
@@ -459,7 +486,7 @@ namespace ChillConnect
|
||||
//is debug test--------
|
||||
|
||||
|
||||
// return true;//zhushi
|
||||
return true;//zhushi
|
||||
// return false;//zhushi
|
||||
// return false;//zhushi
|
||||
return GetLoginModel().IsMagic;
|
||||
@@ -542,7 +569,8 @@ namespace ChillConnect
|
||||
{
|
||||
currency102 = DataMgr.Ticket.Value;
|
||||
}
|
||||
|
||||
var exchangeRateVo = GetExchangeRateVo();
|
||||
currency102 = (decimal)exchangeRateVo.Multi * currency102;
|
||||
if (IsGiftSwitch())
|
||||
{
|
||||
if (isRDExchangeMode())
|
||||
@@ -551,7 +579,7 @@ namespace ChillConnect
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"${currency102:N}";
|
||||
return $"{exchangeRateVo.Payicon}{currency102:N}";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -568,14 +596,16 @@ namespace ChillConnect
|
||||
|
||||
public static string getChString(decimal ch)
|
||||
{
|
||||
var exchangeRateVo = GetExchangeRateVo();
|
||||
ch = (decimal)exchangeRateVo.Multi * ch;
|
||||
if (GameHelper.isRDExchangeMode()&&GameHelper.IsGiftSwitch())
|
||||
{
|
||||
string str = "<img src='ui://o9974uc5qbo98'/>";
|
||||
return str + $"$ {ch:N}";
|
||||
return str + $"{exchangeRateVo.Payicon}{ch:N}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"${ch:N}";
|
||||
return $"{exchangeRateVo.Currency}{ch:N}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -615,12 +645,14 @@ namespace ChillConnect
|
||||
GameHelper.ShowTips("Trying to call send mail...");
|
||||
}
|
||||
|
||||
public static string GetCurrCountry()
|
||||
{
|
||||
var loginModel = GetLoginModel();
|
||||
var country = loginModel.Country;
|
||||
return country.ToUpper();
|
||||
}
|
||||
// public static string GetCurrCountry()
|
||||
// {
|
||||
// var loginModel = GetLoginModel();
|
||||
// var country = loginModel.Country;
|
||||
// return country.ToUpper();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
public static bool CheckAccountValidly(string account)
|
||||
{
|
||||
@@ -1344,7 +1376,7 @@ namespace ChillConnect
|
||||
|
||||
return types;
|
||||
}
|
||||
|
||||
public static bool IsTemporaryEnd;
|
||||
|
||||
private static GameObject RainPlayUI;
|
||||
|
||||
@@ -1361,13 +1393,17 @@ namespace ChillConnect
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsTemporaryEnd;
|
||||
|
||||
private static int ShowStatementViewCount = 0;
|
||||
public static void ShowStatementView()
|
||||
{
|
||||
if (ShowStatementViewCount > 0) return;
|
||||
if (!IsGiftSwitch()) return;
|
||||
if (ConfigSystem.GetConfig<CommonModel>().StatementSwitch == 0)
|
||||
{
|
||||
HallManager.Instance.openTipsTimes++;
|
||||
ShowStatementViewCount++;
|
||||
return;
|
||||
}
|
||||
|
||||
ShowStatementViewCount++;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.StatementViewUI_Open);
|
||||
@@ -1375,12 +1411,7 @@ namespace ChillConnect
|
||||
public static void IsShowPettyReward()
|
||||
{
|
||||
if (!IsGiftSwitch()) return;
|
||||
|
||||
Debug.Log($"PreferencesMgr.Instance.IsGetPettyReward===={SaveData.GetSaveObject().IsGetPettyReward}");
|
||||
if (SaveData.GetSaveObject().IsGetPettyReward) return;
|
||||
|
||||
SaveData.GetSaveObject().IsGetPettyReward = true;
|
||||
SaveData.saveDataFunc();
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PettyAwardUI_Open);
|
||||
}
|
||||
|
||||
@@ -1389,7 +1420,9 @@ namespace ChillConnect
|
||||
{
|
||||
// if (!GameHelper.IsGiftSwitch())
|
||||
var isGet = SaveData.GetSaveObject().IsGetFirstReward;
|
||||
if (loginModel.NewPlayer || !isGet )
|
||||
Debug.Log($"NewPlayer===={GetLoginModel().NewPlayer}");
|
||||
|
||||
if (GetLoginModel().NewPlayer )
|
||||
{
|
||||
if (IsGiftSwitch())
|
||||
{
|
||||
@@ -1400,6 +1433,9 @@ namespace ChillConnect
|
||||
var awardNum = ConfigSystem.GetConfig<CommonModel>().InitialNum;
|
||||
addMoney(awardNum);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update102);
|
||||
|
||||
//小额发放
|
||||
IsShowPettyReward();
|
||||
}
|
||||
|
||||
AddGoldNumber(50);
|
||||
@@ -1632,7 +1668,6 @@ namespace ChillConnect
|
||||
}
|
||||
public static string getDesByKey(string key)
|
||||
{
|
||||
Debug.Log(key);
|
||||
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<ExchangeDesModel>().DataList));
|
||||
if (isRDExchangeMode())
|
||||
{
|
||||
@@ -1694,11 +1729,15 @@ namespace ChillConnect
|
||||
}
|
||||
public static string getPrice(decimal ch)
|
||||
{
|
||||
return $"${ch:N}";
|
||||
var vo = GetExchangeRateVo();
|
||||
ch *= (decimal)vo.Multi;
|
||||
return $"{vo.Payicon}{ch:N}";
|
||||
}
|
||||
public static string GetPriceInt(decimal ch)
|
||||
{
|
||||
return $"${ch:N0}";
|
||||
var vo = GetExchangeRateVo();
|
||||
ch *= (decimal)vo.Multi;
|
||||
return $"{vo.Payicon}{ch:N0}";
|
||||
}
|
||||
public static void CopyText(string text)
|
||||
{
|
||||
|
||||
@@ -68,23 +68,19 @@ namespace ChillConnect
|
||||
MaxPayManager.Instance.PaySuccess();
|
||||
}
|
||||
|
||||
var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
|
||||
DateTime newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||
newDate = newDate.AddSeconds(GameHelper.GetNowTime(true));
|
||||
// Debug.Log($"barry newdate==== {newDate}");
|
||||
var newDays = newDate.Day;
|
||||
|
||||
}
|
||||
private void OnGameStart(object obj)
|
||||
{
|
||||
var lang = PlayerPrefsKit.ReadString("LangIdKey");
|
||||
if (lang.IsNullOrWhiteSpace())
|
||||
{
|
||||
lang = "en";
|
||||
}
|
||||
|
||||
// var lang = PlayerPrefsKit.ReadString("LangIdKey");
|
||||
// if (lang.IsNullOrWhiteSpace())
|
||||
// {
|
||||
// lang = "en";
|
||||
// }
|
||||
|
||||
// UIManager.Instance.SetSwitchLanguage(lang);
|
||||
|
||||
|
||||
EnterHall(true);
|
||||
isGameStart = true;
|
||||
|
||||
@@ -103,8 +99,6 @@ namespace ChillConnect
|
||||
|
||||
private void EnterHall(object obj = null)
|
||||
{
|
||||
// int index = obj != null ? (int)obj : 2;
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PlayUI_Close);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardAniUI_Close);
|
||||
AudioManager.Instance.StopBGM();
|
||||
@@ -112,45 +106,6 @@ namespace ChillConnect
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ArrowGameUI_Open);
|
||||
|
||||
// if (GameHelper.IsGiftSwitch() && (obj != null))
|
||||
// {
|
||||
// int h5rate = GameHelper.GetCommonModel().loginhallrate;
|
||||
// int roomrate = GameHelper.GetCommonModel().roomrate;
|
||||
// // if (UnityEngine.Random.Range(1, 100) < h5rate) {
|
||||
// // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open);
|
||||
// // } else
|
||||
// if (UnityEngine.Random.Range(1, 100) < roomrate)
|
||||
// {//进入玩法
|
||||
//
|
||||
// GameHelper.is_first_login = false;
|
||||
// if (!SaveData.GetSaveObject().have_slot && (DateTime.Now.Day != PlayerPrefs.GetInt("off_new", 0)))
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open);
|
||||
// PlayerPrefs.SetInt("off_new", DateTime.Now.Day);
|
||||
// }
|
||||
// if (!SaveData.GetSaveObject().have_slot && UnityEngine.Random.Range(0, 100) < ConfigSystem.GetConfig<CommonModel>().BonusInside)
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RainPlayUI_Open, true);
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GameHelper.is_first_login = false;
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open, true);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GameHelper.is_first_login = false;
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open);
|
||||
// }
|
||||
|
||||
|
||||
if (GameHelper.IsGiftSwitch()) UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BroadcastUI_Open);
|
||||
GameHelper.PlayGameTimeEvent(1);
|
||||
}
|
||||
@@ -169,36 +124,43 @@ namespace ChillConnect
|
||||
|
||||
|
||||
private void OpenWb(object obj) {
|
||||
|
||||
return;
|
||||
if (obj is not SDKOpenConfig openConfig) return;
|
||||
|
||||
|
||||
|
||||
Debug.Log($"open wb normal==={openConfig.normal} url==={openConfig.url}");
|
||||
SdkConfigMgr.Instance.Open(openConfig.normal, openConfig.url);
|
||||
SetCameraVisible(false);
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open, openConfig);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open);
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
|
||||
|
||||
if (UIManager.Instance.IsExistUI(UIConst.GameLoginUI))
|
||||
{
|
||||
Debug.Log($"gamelogin ui is exist ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void SetCameraVisible(bool visible)
|
||||
{
|
||||
// 只在首次调用时查找
|
||||
if (_gameCamera == null)
|
||||
{
|
||||
// 使用 FindWithTag 确保能找到非激活对象
|
||||
|
||||
_gameCamera = GameObject.Find("GameCamera").GetComponent<Camera>();
|
||||
|
||||
}
|
||||
if (_gameCamera != null)
|
||||
{
|
||||
_gameCamera.enabled = visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("GameCamera reference not found!");
|
||||
}
|
||||
// // 只在首次调用时查找
|
||||
// if (_gameCamera == null)
|
||||
// {
|
||||
// // 使用 FindWithTag 确保能找到非激活对象
|
||||
//
|
||||
// _gameCamera = GameObject.Find("GameCamera").GetComponent<Camera>();
|
||||
//
|
||||
// }
|
||||
// if (_gameCamera != null)
|
||||
// {
|
||||
// _gameCamera.enabled = visible;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.LogError("GameCamera reference not found!");
|
||||
// }
|
||||
|
||||
GameHelper.ShowSheepPlayUI(visible);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user