diff --git a/ArrowBeatTap-Gp.sln.DotSettings.user b/ArrowBeatTap-Gp.sln.DotSettings.user index 5e4e497..51261bc 100644 --- a/ArrowBeatTap-Gp.sln.DotSettings.user +++ b/ArrowBeatTap-Gp.sln.DotSettings.user @@ -1,5 +1,6 @@  ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded @@ -10,8 +11,10 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded \ No newline at end of file diff --git a/Assets/AddressableAssetsData/Android/addressables_content_state.bin b/Assets/AddressableAssetsData/Android/addressables_content_state.bin index 9b6890f..1fd3c90 100644 Binary files a/Assets/AddressableAssetsData/Android/addressables_content_state.bin and b/Assets/AddressableAssetsData/Android/addressables_content_state.bin differ diff --git a/Assets/ChillConnect/Define/Model/Config/Game/CommonModel.cs b/Assets/ChillConnect/Define/Model/Config/Game/CommonModel.cs index 4502771..40ea871 100644 --- a/Assets/ChillConnect/Define/Model/Config/Game/CommonModel.cs +++ b/Assets/ChillConnect/Define/Model/Config/Game/CommonModel.cs @@ -91,6 +91,7 @@ namespace IgnoreOPS public int[] WVOffset; public string X_Redeemcode; + public string X_ShopURL; public CommonModel(string key) : base(key) diff --git a/Assets/ChillConnect/Define/Model/Config/Game/MakeupModel.cs b/Assets/ChillConnect/Define/Model/Config/Game/MakeupModel.cs index de19049..52a4728 100644 --- a/Assets/ChillConnect/Define/Model/Config/Game/MakeupModel.cs +++ b/Assets/ChillConnect/Define/Model/Config/Game/MakeupModel.cs @@ -31,6 +31,8 @@ namespace IgnoreOPS public int Active_time; public int Active_time_Down; public int Active_Limit_times; + public string[] T_Redeemcode; + public string T_ShopURL; } public class MakeupModel_2 : ConfigModel @@ -63,5 +65,7 @@ namespace IgnoreOPS public int Reset_time; public float ADIncrease; public int PayIncrease; + public string[] C_Redeemcode; + public string C_ShopURL; } } \ No newline at end of file diff --git a/Assets/ChillConnect/Helper/GameHelper.cs b/Assets/ChillConnect/Helper/GameHelper.cs index a947478..0d85a1c 100644 --- a/Assets/ChillConnect/Helper/GameHelper.cs +++ b/Assets/ChillConnect/Helper/GameHelper.cs @@ -1340,7 +1340,7 @@ namespace ChillConnect { if (RainPlayUI == null) { - RainPlayUI = GameObject.Find("(RainPlayUI)sheep_play"); + RainPlayUI = GameObject.Find("(ArrowGameUI)com_arrow_game"); } if (RainPlayUI != null) @@ -1636,28 +1636,33 @@ namespace ChillConnect // return true; //zhushi return SaveData.GetSaveObject().ExchangeModeToggle == 1; } - private static HashSet generatedKeys = new HashSet(); - public static string GenerateUniqueKey() + // private static HashSet generatedKeys = new HashSet(); + public static string GenerateUniqueKey(Makeup vo, int index) { - const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - - string key; - do + // 处理数组为空的边界情况 + if (vo.T_Redeemcode == null || vo.T_Redeemcode.Length == 0) { - StringBuilder sb = new StringBuilder(); - - sb.Append(GenerateRandomString(chars, 4)); - sb.Append("-"); - sb.Append(GenerateRandomString(chars, 6)); - sb.Append("-"); - sb.Append(GenerateRandomString(chars, 4)); - - key = sb.ToString(); - } while (generatedKeys.Contains(key)); // 如果重复就重新生成 - - generatedKeys.Add(key); // 添加到集合中 - return key; + return string.Empty; + } + + // 如果 index 超出范围,取最后一个元素;否则直接返回对应索引的元素 + int validIndex = index >= 0 && index < vo.T_Redeemcode.Length ? index : vo.T_Redeemcode.Length - 1; + return vo.T_Redeemcode[validIndex]; } + + public static string GenerateUniqueKey1(Makeup_2 vo, int index) + { + // 处理数组为空的边界情况 + if (vo.C_Redeemcode == null || vo.C_Redeemcode.Length == 0) + { + return string.Empty; + } + + // 如果 index 超出范围,取最后一个元素;否则直接返回对应索引的元素 + int validIndex = index >= 0 && index < vo.C_Redeemcode.Length ? index : vo.C_Redeemcode.Length - 1; + return vo.C_Redeemcode[validIndex]; + } + static string GenerateRandomString(string charSet, int length) { StringBuilder sb = new StringBuilder(); diff --git a/Assets/ChillConnect/Manager/HallManager.cs b/Assets/ChillConnect/Manager/HallManager.cs index 6f754db..fa5ee45 100644 --- a/Assets/ChillConnect/Manager/HallManager.cs +++ b/Assets/ChillConnect/Manager/HallManager.cs @@ -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(); + + } + if (_gameCamera != null) + { + _gameCamera.enabled = visible; + } + else + { + Debug.LogError("GameCamera reference not found!"); + } + + GameHelper.ShowSheepPlayUI(visible); + } + #region 缓存资源 public void GetGalleryNet(int imageID, Action action = null) diff --git a/Assets/Resources/ChillConnectAssets/FGUI/tixian_fui.bytes b/Assets/Resources/ChillConnectAssets/FGUI/tixian_fui.bytes index 4af9d95..2e1ba48 100644 Binary files a/Assets/Resources/ChillConnectAssets/FGUI/tixian_fui.bytes and b/Assets/Resources/ChillConnectAssets/FGUI/tixian_fui.bytes differ diff --git a/Assets/Resources/SdkConfigMgr.asset b/Assets/Resources/SdkConfigMgr.asset index 82a99a4..3941873 100644 --- a/Assets/Resources/SdkConfigMgr.asset +++ b/Assets/Resources/SdkConfigMgr.asset @@ -12,6 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fb2c9d85afdd3d34c88a57c51b02fa84, type: 3} m_Name: SdkConfigMgr m_EditorClassIdentifier: - secret: KFG8KMWDJ + secret: JMXRDCA6Y host: isLog: 1 diff --git a/Assets/Scenes/MainScene.unity b/Assets/Scenes/MainScene.unity index d277c4f..917b221 100644 --- a/Assets/Scenes/MainScene.unity +++ b/Assets/Scenes/MainScene.unity @@ -1198,52 +1198,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2110239011 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2110239013} - - component: {fileID: 2110239014} - m_Layer: 0 - m_Name: WebviewManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2110239013 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2110239011} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2110239014 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2110239011} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7f3b9d6c409a4d71bcc6f0c3720f826d, type: 3} - m_Name: - m_EditorClassIdentifier: - select_glist_y: 0 - orthoCamera: {fileID: 0} --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 @@ -1261,6 +1215,5 @@ SceneRoots: - {fileID: 782628377} - {fileID: 1260515730} - {fileID: 1183762477} - - {fileID: 2110239013} - {fileID: 1361344199} - {fileID: 1356900051} diff --git a/Assets/Scripts/ChillConnectRoot.cs b/Assets/Scripts/ChillConnectRoot.cs index 4e391c0..6254fce 100644 --- a/Assets/Scripts/ChillConnectRoot.cs +++ b/Assets/Scripts/ChillConnectRoot.cs @@ -4,6 +4,7 @@ using SGModule.MarkdownKit; using SGModule.Net; using SGModule.NetKit; using UnityEngine; +using UNSDK; public class ChillConnectRoot : MonoBehaviour @@ -18,6 +19,8 @@ public class ChillConnectRoot : MonoBehaviour // NetworkKit.Instance.InitData(ConfigManager.GameConfig.packageName, ConfigManager.GameConfig.isRelease); + SdkConfigMgr.Init(); + MaxADKit.Init(); OnLauncher(); diff --git a/Assets/Scripts/Define/Message/CtrlMsg_Base_0-9999.cs b/Assets/Scripts/Define/Message/CtrlMsg_Base_0-9999.cs index 99927aa..a358145 100644 --- a/Assets/Scripts/Define/Message/CtrlMsg_Base_0-9999.cs +++ b/Assets/Scripts/Define/Message/CtrlMsg_Base_0-9999.cs @@ -8,5 +8,8 @@ namespace ChillConnect public static readonly uint Login_Succeed = ++Cursor_BASE; public static readonly uint Game_StartReady = ++Cursor_BASE; public static readonly uint Game_Start = ++Cursor_BASE; + + public static readonly uint open_wb = ++Cursor_BASE; + } } \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ArrowGame/ArrowGameUI.cs b/Assets/Scripts/ModuleUI/ArrowGame/ArrowGameUI.cs index 1d990af..3db5b74 100644 --- a/Assets/Scripts/ModuleUI/ArrowGame/ArrowGameUI.cs +++ b/Assets/Scripts/ModuleUI/ArrowGame/ArrowGameUI.cs @@ -112,7 +112,7 @@ namespace ChillConnect { uiInfo.packageName = "Arrow_game"; uiInfo.assetName = "com_arrow_game"; - uiInfo.layerType = UILayerType.Popup; + uiInfo.layerType = UILayerType.Bottom; uiInfo.isNeedOpenAnim = false; uiInfo.isNeedCloseAnim = false; uiInfo.isNeedUIMask = true; diff --git a/Assets/Scripts/ModuleUI/H5/H5UI.cs b/Assets/Scripts/ModuleUI/H5/H5UI.cs index e42bb56..62d7caa 100644 --- a/Assets/Scripts/ModuleUI/H5/H5UI.cs +++ b/Assets/Scripts/ModuleUI/H5/H5UI.cs @@ -4,6 +4,7 @@ using FGUI.ZM_H5_15; using IgnoreOPS; using SGModule.NetKit; +using UNSDK; namespace ChillConnect { @@ -40,6 +41,11 @@ namespace ChillConnect GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true); GameDispatcher.Instance.Dispatch(GameMsg.showBroadCast); + + HallManager.Instance.SetCameraVisible(true); + + SdkConfigMgr.Instance.Close(); + } diff --git a/Assets/Scripts/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs b/Assets/Scripts/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs index 4e7eacd..12245f4 100644 --- a/Assets/Scripts/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs +++ b/Assets/Scripts/ModuleUI/MakeupConfirm/MakeupConfirmUI.cs @@ -11,6 +11,7 @@ using Newtonsoft.Json; using SGModule.Net; using SGModule.NetKit; using UnityEngine; +using UNSDK; using Random = UnityEngine.Random; namespace ChillConnect @@ -959,7 +960,7 @@ namespace ChillConnect for (int j = 0; j < tickets[i]; j++) { makeupRdData data = new makeupRdData(); - data.code = GameHelper.GenerateUniqueKey(); + data.code = GameHelper.GenerateUniqueKey(vo, j); data.coupon_mount = arr[i]; data.isClaimed = false; makeupTaskData.rdData.Add(data); @@ -1048,7 +1049,15 @@ namespace ChillConnect ui.btn_contact_us.SetClick(() => { - GameHelper.OpenEmail(); + // GameHelper.OpenEmail(); + SDKOpenConfig openConfig = new SDKOpenConfig + { + normal = false, + url = vo.T_ShopURL + }; + CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig); + + CtrlCloseUI(); }); } diff --git a/Assets/Scripts/ModuleUI/RedeemCode/RedeemCodeUI.cs b/Assets/Scripts/ModuleUI/RedeemCode/RedeemCodeUI.cs index 6cb82c7..64459c7 100644 --- a/Assets/Scripts/ModuleUI/RedeemCode/RedeemCodeUI.cs +++ b/Assets/Scripts/ModuleUI/RedeemCode/RedeemCodeUI.cs @@ -1,6 +1,7 @@ using FGUI.tixian; using IgnoreOPS; +using UNSDK; namespace ChillConnect { @@ -73,6 +74,13 @@ namespace ChillConnect ui.btn_contact_us.SetClick(() => { + SDKOpenConfig openConfig = new SDKOpenConfig + { + normal = false, + url = ConfigSystem.GetConfig().X_ShopURL + }; + CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig); + CtrlCloseUI(); }); ui.btn_close1.SetClick(CtrlCloseUI); diff --git a/Assets/Scripts/ModuleUI/SaveingPot/SaveingPotUI.cs b/Assets/Scripts/ModuleUI/SaveingPot/SaveingPotUI.cs index b364e04..a4d518f 100644 --- a/Assets/Scripts/ModuleUI/SaveingPot/SaveingPotUI.cs +++ b/Assets/Scripts/ModuleUI/SaveingPot/SaveingPotUI.cs @@ -12,6 +12,7 @@ using SGModule.Net; using SGModule.NetKit; using Spine.Unity; using UnityEngine; +using UNSDK; using Random = UnityEngine.Random; namespace ChillConnect @@ -484,7 +485,7 @@ namespace ChillConnect for (int j = 0; j < tickets[i]; j++) { SaveingPotRdData data = new SaveingPotRdData(); - data.code = GameHelper.GenerateUniqueKey(); + data.code = GameHelper.GenerateUniqueKey1(vo,i); data.coupon_mount = arr[i]; data.isClaimed = false; makeupTaskData.rdData.Add(data); @@ -575,7 +576,15 @@ namespace ChillConnect ui.btn_contact_us.SetClick(() => { - GameHelper.OpenEmail(); + // GameHelper.OpenEmail(); + SDKOpenConfig openConfig = new SDKOpenConfig + { + normal = false, + url = vo.C_ShopURL + }; + CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig); + + CtrlCloseUI(); }); } diff --git a/Assets/Uni2SDK/Scripts/SdkConfigMgr.cs b/Assets/Uni2SDK/Scripts/SdkConfigMgr.cs index 284254c..eea88d4 100644 --- a/Assets/Uni2SDK/Scripts/SdkConfigMgr.cs +++ b/Assets/Uni2SDK/Scripts/SdkConfigMgr.cs @@ -1,5 +1,6 @@ using System.Collections; using System.Collections.Generic; +using Newtonsoft.Json; using Uni2SDK; using UnityEngine; using UnityEngine.Serialization; @@ -30,9 +31,9 @@ namespace UNSDK public static void Init(string packageName = "") { - var package = "com.wackyllamagame.chaos";//StringExtensions.IsNullOrWhiteSpace(packageName) ? Application.identifier: packageName; + var package = StringExtensions.IsNullOrWhiteSpace(packageName) ? Application.identifier: packageName; - Uni2SDKManager.Instance.SetPackage(package); + Uni2SDKManager.Instance.SetPackage("com.wackyllamagame.chaos",package); Uni2SDKManager.Instance.SetLog(Instance.isLog); @@ -58,13 +59,21 @@ namespace UNSDK /// 开启有感 /// 开启时:需要将其他游戏界面等隐藏,注意,是隐藏,不是在其界面上再添加一个界面 /// - public void Open() + public void Open(bool normal = true, string url = "") { #if !UNITY_EDITOR - Uni2SDKManager.Instance.Open(0,164,0,0); + Uni2SDKManager.Instance.Open(0,164,0,0,normal,url); #endif } } + public class SDKOpenConfig + { + [JsonProperty("normal")] + public bool normal; + [JsonProperty("url")] + public string url; + } + } diff --git a/Assets/Uni2SDK/WV2SDK.dll b/Assets/Uni2SDK/WV2SDK.dll index 19e82ad..cb26654 100644 Binary files a/Assets/Uni2SDK/WV2SDK.dll and b/Assets/Uni2SDK/WV2SDK.dll differ