fix:1、sdk更换。2、修复bug
This commit is contained in:
@@ -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