From 110660f299b448ed55f3590af76887b41716e7dc Mon Sep 17 00:00:00 2001 From: barry Date: Tue, 14 Jul 2026 14:13:52 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A1=E3=80=81=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssetGroups/Built In Data.asset | 17 +----- .../AssetGroups/Default Local Group.asset | 2 +- ... Local Group_BundledAssetGroupSchema.asset | 6 +- ...Local Group_ContentUpdateGroupSchema.asset | 2 +- Assets/AddressableAssetsData/link.xml | 15 ----- Assets/AddressableAssetsData/link.xml.meta | 7 --- .../Model/Config/Game/ExchangeDesModel.cs | 8 +++ Assets/RedHotRoast/Helper/GameHelper.cs | 60 +++++++++++++++---- .../TextAsset/I18N/{br.xml => ru.xml} | 0 .../I18N/{br.xml.meta => ru.xml.meta} | 0 Assets/Scripts/ModuleUI/Hall/HallUI.cs | 1 + Assets/Scripts/ModuleUI/Loading/LoadingUI.cs | 7 +++ .../ModuleUI/SaveingPot/SaveingPotUI.cs | 14 ++--- Assets/Scripts/ToolKit/Language.cs | 16 ++--- RedHotRoast-ios.sln.DotSettings.user | 1 + 15 files changed, 86 insertions(+), 70 deletions(-) delete mode 100644 Assets/AddressableAssetsData/link.xml delete mode 100644 Assets/AddressableAssetsData/link.xml.meta rename Assets/Resources/RedHotRoastAssets/TextAsset/I18N/{br.xml => ru.xml} (100%) rename Assets/Resources/RedHotRoastAssets/TextAsset/I18N/{br.xml.meta => ru.xml.meta} (100%) diff --git a/Assets/AddressableAssetsData/AssetGroups/Built In Data.asset b/Assets/AddressableAssetsData/AssetGroups/Built In Data.asset index 17707a9b..9fd57b3f 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Built In Data.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Built In Data.asset @@ -15,20 +15,9 @@ MonoBehaviour: m_GroupName: Built In Data m_Data: m_SerializedData: [] - m_GUID: b6e6294fd2ce84e69babdcf02024855b - m_SerializeEntries: - - m_GUID: EditorSceneList - m_Address: EditorSceneList - m_ReadOnly: 1 - m_SerializedLabels: [] - FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: Resources - m_Address: Resources - m_ReadOnly: 1 - m_SerializedLabels: [] - FlaggedDuringContentUpdateRestriction: 0 + m_GUID: f5206167a7608ef448df490e42990168 + m_SerializeEntries: [] m_ReadOnly: 1 m_Settings: {fileID: 11400000, guid: e60983ba8459aa349988c3ecb65abf31, type: 2} m_SchemaSet: - m_Schemas: - - {fileID: 11400000, guid: 0771ae25d28c8437b9222dcb0cbf91a1, type: 2} + m_Schemas: [] diff --git a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset index 7f642544..83f4b96f 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset @@ -15,7 +15,7 @@ MonoBehaviour: m_GroupName: Default Local Group m_Data: m_SerializedData: [] - m_GUID: bf4be40b2f8134ca58296430b441c34c + m_GUID: ee8779760d3c7a346956ec80a7e8f542 m_SerializeEntries: - m_GUID: 2286bdb9423d4da48ba3b1bd8765173f m_Address: Assets/Configs diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset index 1f2e7de1..f2541cba 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3} m_Name: Default Local Group_BundledAssetGroupSchema m_EditorClassIdentifier: - m_Group: {fileID: 11400000, guid: 9509abfdb587c41faba2e57981af0044, type: 2} + m_Group: {fileID: 0} m_InternalBundleIdMode: 1 m_Compression: 1 m_IncludeAddressInCatalog: 1 @@ -34,9 +34,9 @@ MonoBehaviour: m_RedirectLimit: -1 m_RetryCount: 0 m_BuildPath: - m_Id: 8debd0b1021fa413d9261181a7945ce0 + m_Id: c18fb8ec4a732eb46a1d69df4b844eef m_LoadPath: - m_Id: 7cb9206d2b5674f6abdf9abe0f879e31 + m_Id: 3eabfc860a0ea834ea688f5a1ecdddf0 m_BundleMode: 0 m_AssetBundleProviderType: m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset index 417f9b71..c6824714 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset @@ -12,5 +12,5 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3} m_Name: Default Local Group_ContentUpdateGroupSchema m_EditorClassIdentifier: - m_Group: {fileID: 11400000, guid: 9509abfdb587c41faba2e57981af0044, type: 2} + m_Group: {fileID: 0} m_StaticContent: 0 diff --git a/Assets/AddressableAssetsData/link.xml b/Assets/AddressableAssetsData/link.xml deleted file mode 100644 index 892bcadc..00000000 --- a/Assets/AddressableAssetsData/link.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Assets/AddressableAssetsData/link.xml.meta b/Assets/AddressableAssetsData/link.xml.meta deleted file mode 100644 index 4c9116f2..00000000 --- a/Assets/AddressableAssetsData/link.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 31634554e5dfe40e7afe2944f58fdd6d -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/RedHotRoast/Define/Model/Config/Game/ExchangeDesModel.cs b/Assets/RedHotRoast/Define/Model/Config/Game/ExchangeDesModel.cs index 515ec54b..d3ab5c79 100644 --- a/Assets/RedHotRoast/Define/Model/Config/Game/ExchangeDesModel.cs +++ b/Assets/RedHotRoast/Define/Model/Config/Game/ExchangeDesModel.cs @@ -9,5 +9,13 @@ namespace IgnoreOPS public string des_key; public string Mode_0; public string Mode_1; + public string Mode_FR; + public string Mode_DE; + public string Mode_ES; + public string Mode_PT; + public string Mode_JA; + public string Mode_KO; + public string Mode_RU; + public string Mode_ID; } } \ No newline at end of file diff --git a/Assets/RedHotRoast/Helper/GameHelper.cs b/Assets/RedHotRoast/Helper/GameHelper.cs index 2ddcdbb5..75947201 100644 --- a/Assets/RedHotRoast/Helper/GameHelper.cs +++ b/Assets/RedHotRoast/Helper/GameHelper.cs @@ -1798,26 +1798,60 @@ namespace RedHotRoast #endregion + public static string getDesByKey(string key) { - Debug.Log(key); - Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig())); - if (isRDExchangeMode()) + var config = ConfigSystem.GetConfig(); + var data = config.FirstOrDefault(d => d.des_key == key); + + if (data == null) + return ""; + + // 根据语言动态获取对应的字段值 + string property = GetModelByLanguage(data); + + if (property == null) { - string str = ConfigSystem.GetConfig().FirstOrDefault(data => data.des_key == key)?.Mode_1 ?? ""; - if (str != "") - { - str = str.Replace("", "") - .Replace("", ""); - } - return str; + // 如果找不到对应语言字段,返回默认的 Mode_1 + return data.Mode_1 ?? ""; } - else + + string str = property ?? ""; + + if (str != "" && isRDExchangeMode()) { - return ConfigSystem.GetConfig().FirstOrDefault(data => data.des_key == key)?.Mode_0 ?? ""; + str = str.Replace("", "") + .Replace("", ""); + } + + return str; + + } + private static string GetModelByLanguage(ExchangeDes vo) + { + var language = Language.getCurrentLanguage(); + switch (language) + { + case "fr"://法语 + return vo.Mode_FR; + case "de"://德语 + return vo.Mode_DE; + case "es"://西班牙语 + return vo.Mode_ES; + case "pt"://葡萄牙语 + return vo.Mode_PT; + case "ja"://日语 + return vo.Mode_JA; + case "ko"://韩语 + return vo.Mode_KO; + case "ru"://俄语 + return vo.Mode_RU; + case "id"://印尼语 + return vo.Mode_ID; + default: + return vo.Mode_1; } } - public static bool isRDExchangeMode() { // return true; //zhushi diff --git a/Assets/Resources/RedHotRoastAssets/TextAsset/I18N/br.xml b/Assets/Resources/RedHotRoastAssets/TextAsset/I18N/ru.xml similarity index 100% rename from Assets/Resources/RedHotRoastAssets/TextAsset/I18N/br.xml rename to Assets/Resources/RedHotRoastAssets/TextAsset/I18N/ru.xml diff --git a/Assets/Resources/RedHotRoastAssets/TextAsset/I18N/br.xml.meta b/Assets/Resources/RedHotRoastAssets/TextAsset/I18N/ru.xml.meta similarity index 100% rename from Assets/Resources/RedHotRoastAssets/TextAsset/I18N/br.xml.meta rename to Assets/Resources/RedHotRoastAssets/TextAsset/I18N/ru.xml.meta diff --git a/Assets/Scripts/ModuleUI/Hall/HallUI.cs b/Assets/Scripts/ModuleUI/Hall/HallUI.cs index 87422047..542eb209 100644 --- a/Assets/Scripts/ModuleUI/Hall/HallUI.cs +++ b/Assets/Scripts/ModuleUI/Hall/HallUI.cs @@ -483,6 +483,7 @@ namespace RedHotRoast ui.btn_setting.SetClick(OnClickSetting); ui.btn_shop.SetClick(OnClickShop); // ui.btn_secret.SetClick(OnClickSecretAlbums); + ui.btn_vip.visible = false; ui.btn_vip.SetClick(onClickVip); WebviewManager.Instance.SetDarkThough(true); diff --git a/Assets/Scripts/ModuleUI/Loading/LoadingUI.cs b/Assets/Scripts/ModuleUI/Loading/LoadingUI.cs index 7b3b32e2..87d13e57 100644 --- a/Assets/Scripts/ModuleUI/Loading/LoadingUI.cs +++ b/Assets/Scripts/ModuleUI/Loading/LoadingUI.cs @@ -53,6 +53,13 @@ namespace RedHotRoast protected override void OnOpenBefore(object args) { + var lang = PlayerPrefsKit.ReadString("LangIdKey"); + if (lang.IsNullOrWhiteSpace()) + { + lang = "en"; + } + UIManager.Instance.SetSwitchLanguage(lang); + UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenBgUI_Open); ui.com_pb.max = 100; ui.com_pb.value = 0; diff --git a/Assets/Scripts/ModuleUI/SaveingPot/SaveingPotUI.cs b/Assets/Scripts/ModuleUI/SaveingPot/SaveingPotUI.cs index ef0fcd76..a5a18ba2 100644 --- a/Assets/Scripts/ModuleUI/SaveingPot/SaveingPotUI.cs +++ b/Assets/Scripts/ModuleUI/SaveingPot/SaveingPotUI.cs @@ -155,7 +155,6 @@ namespace RedHotRoast //初始化页面逻辑 private void InitView() { - Debug.Log($"DataMgr.ExchangeAccount====={DataMgr.ExchangeAccount.Value}"); Makeup_2 makeupVo = MakeupModel_2.GetData(makeupTaskData.tableId); ui.text_ad.text = string.Format(GameHelper.getDesByKey("saving_pot_5"), makeupVo.ADIncrease); string str = string.Format(GameHelper.getDesByKey("saving_pot_2"), makeupVo.PayIncrease); @@ -214,7 +213,7 @@ namespace RedHotRoast }); HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn; - DOVirtual.DelayedCall(0.1f, InitView); + InitView(); } if (SaveData.GetSaveObject().saveingpot_ch > SaveData.GetSaveObject().last_saveingpot_ch) { @@ -327,12 +326,11 @@ namespace RedHotRoast btn_watchAd btn_watchad = ui.btn_ch as btn_watchAd; btn_watchad.img_saveingpot.visible = false; - if (SaveData.GetSaveObject().saveingpot_ch >= makeupTaskData.amount) - { - HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn; - InitView(); - return; - } + // if (SaveData.GetSaveObject().saveingpot_ch >= makeupTaskData.amount) + // { + // InitView(); + // return; + // } if (GameHelper.GetNowTime() < lastAdTimes) { diff --git a/Assets/Scripts/ToolKit/Language.cs b/Assets/Scripts/ToolKit/Language.cs index b3a982b0..bf8947ff 100644 --- a/Assets/Scripts/ToolKit/Language.cs +++ b/Assets/Scripts/ToolKit/Language.cs @@ -18,12 +18,7 @@ public static class Language Debug.Log($"languageInitialize systemLanguage = {systemLanguage}"); var lang = "en"; - // if (DataMgr.selectLanguage.Value != -1) - // { - // lang = getISOCode((SystemLanguage)DataMgr.selectLanguage.Value); - // } - // else - // { + if (systemLanguage == SystemLanguage.English) { lang = "en"; @@ -55,9 +50,12 @@ public static class Language else if (systemLanguage == SystemLanguage.Russian) { lang = "ru"; + }else if (systemLanguage == SystemLanguage.Indonesian) + { + lang = "id"; } // } - // lang = "de"; + lang = "ja"; setCurrentLanguage(lang); } @@ -156,9 +154,11 @@ public static class Language return SystemLanguage.Korean; } else if (ISO_Code == "ru") { return SystemLanguage.Russian; + } else if (ISO_Code == "id") { + return SystemLanguage.Indonesian; } else if (ISO_Code == "pt") { return SystemLanguage.Portuguese; - } else { + }else { return SystemLanguage.English; } } diff --git a/RedHotRoast-ios.sln.DotSettings.user b/RedHotRoast-ios.sln.DotSettings.user index fe6bcfd6..1de6ebca 100644 --- a/RedHotRoast-ios.sln.DotSettings.user +++ b/RedHotRoast-ios.sln.DotSettings.user @@ -7,6 +7,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded <AssemblyExplorer> <Assembly Path="/Users/edy/Documents/RedHotRoast-ios/Assets/TCJPLYRM1xJTSDK/ThirdParty/IAP/Plugins/SDK_IAP.dll" />