fix:1、添加h5.2、修复bug

This commit is contained in:
2026-06-25 14:22:52 +08:00
parent d2741d39be
commit 6ff428bdf2
18 changed files with 130 additions and 79 deletions
+40 -2
View File
@@ -1,6 +1,7 @@
using DG.Tweening;
using IgnoreOPS;
using SGModule.Net;
using UNSDK;
namespace ChillConnect
{
@@ -28,12 +29,12 @@ namespace ChillConnect
private WindowSystem windowSys;
private RewardSystem rewardSys;
private ConsumeSystem consumeSys;
private bool isFirstEnter = true;
public int enterHallTimes = 0;
public bool isShowRankView = false;
public event Action UpdateEvent;
private Camera _gameCamera;
// public int countTimes = 0;
@@ -44,6 +45,8 @@ namespace ChillConnect
GameDispatcher.Instance.AddListener(GameMsg.BackMainScene, EnterHall);
AppDispatcher.Instance.AddListener(MainThreadMsg.App_Focus_True, BackToGame);
CtrlDispatcher.Instance.AddListener(CtrlMsg.open_wb, OpenWb);
SetSoundVolume();
InitSystem();
}
@@ -165,6 +168,41 @@ namespace ChillConnect
}
private void OpenWb(object obj) {
if (obj is not SDKOpenConfig openConfig) return;
SdkConfigMgr.Instance.Open(openConfig.normal, openConfig.url);
SetCameraVisible(false);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open, false);
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
}
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!");
}
GameHelper.ShowSheepPlayUI(visible);
}
#region
public void GetGalleryNet(int imageID, Action<bool> action = null)