fix:1、修复bug

This commit is contained in:
2026-05-27 09:32:33 +08:00
parent 5f68fe42c1
commit d4f6b82209
27 changed files with 388 additions and 379 deletions
-15
View File
@@ -1,15 +0,0 @@
<linker>
<assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
</assembly>
<assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.TextAsset" preserve="all" />
</assembly>
</linker>
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b31a65d8d8c7d4000ac30d2d9ac5c21f
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
@@ -20,8 +20,8 @@ namespace FGUI.LG_live
{
base.ConstructFromXML(xml);
list_ = (GList)GetChildAt(1);
btn_close = (GButton)GetChildAt(2);
list_ = (GList)GetChildAt(2);
btn_close = (GButton)GetChildAt(3);
}
}
}
@@ -25,9 +25,9 @@ namespace FGUI.ZM_Pass_14
type = GetControllerAt(0);
state = GetControllerAt(1);
item_loader = (GLoader)GetChildAt(3);
number_text = (GTextField)GetChildAt(4);
btn_claim = (GButton)GetChildAt(5);
item_loader = (GLoader)GetChildAt(2);
number_text = (GTextField)GetChildAt(3);
btn_claim = (GButton)GetChildAt(4);
}
}
}
+8 -7
View File
@@ -216,27 +216,27 @@ public class TextureHelper
public static string getResPath()
{
// 删除旧资源
if (!DataMgr.curResVersion.Value.IsNullOrWhiteSpace() && DataMgr.curResVersion.Value != ConfigSystem.GetCommonConf().ResVersion)
if (!DataMgr.curResVersion.Value.IsNullOrWhiteSpace() && DataMgr.curResVersion.Value != ConfigSystem.GetConfigResVersion())
{
var oldFolder = Path.Combine(Application.persistentDataPath, DataMgr.curResVersion.Value);
if (Directory.Exists(oldFolder))
{
Directory.Delete(oldFolder, true);
}
DataMgr.curResVersion.Value = ConfigSystem.GetCommonConf().ResVersion;
DataMgr.curResVersion.Value = ConfigSystem.GetConfigResVersion();
}
else if (DataMgr.curResVersion.Value.IsNullOrWhiteSpace())
{
DataMgr.curResVersion.Value = ConfigSystem.GetCommonConf().ResVersion;
DataMgr.curResVersion.Value = ConfigSystem.GetConfigResVersion();
}
if (ConfigSystem.GetCommonConf().ResVersion.IsNullOrWhiteSpace())
if (ConfigSystem.GetConfigResVersion().IsNullOrWhiteSpace())
{
Debug.LogError("获取资源路径失败");
return Application.persistentDataPath;
}
string curFolder = Path.Combine(Application.persistentDataPath, ConfigSystem.GetCommonConf().ResVersion);
string curFolder = Path.Combine(Application.persistentDataPath, ConfigSystem.GetConfigResVersion());
return curFolder;
}
@@ -246,7 +246,7 @@ public class TextureHelper
var localPath = Path.Combine(getResPath(), localFolder, fileName + ".jpg");
if (File.Exists(localPath))
{
Debug.Log($"[SetImgLoader] 本地存在,直接加载 {fileName}");
Debug.Log($"[SetImgLoader] 本地存在,直接加载 {fileName} localPath{localPath}");
CrazyAsyKit.StartCoroutine(LoadTexture(fileName, loader, callback, localFolder, isGameBg));
return;
}
@@ -512,6 +512,7 @@ public static IEnumerator LoadTexture(string fileName, GLoader loader, Action<NT
if (loader != null) loaderRequests.Remove(loader);
Debug.Log($"[LoadTexture www] www.result {www.result}");
if (www.result == UnityWebRequest.Result.Success)
{
var tex = DownloadHandlerTexture.GetContent(www);
@@ -559,7 +560,7 @@ public static IEnumerator LoadTexture(string fileName, GLoader loader, Action<NT
public static string GetDecryptedImagePath(string fileName, string localFolder)
{
string tempPath = Path.Combine(Application.temporaryCachePath, FolderNames.GameCache, localFolder, fileName + "_temp.jpg");
// Debug.Log($"获取解密路径: {tempPath}");
Debug.Log($"获取解密路径: {tempPath}");
if (!File.Exists(tempPath))
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 KiB

After

Width:  |  Height:  |  Size: 790 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 KiB

After

Width:  |  Height:  |  Size: 445 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 21 KiB

+151 -151
View File
@@ -1,151 +1,151 @@
namespace RedHotRoast
{
public class BuyPropUI : BaseUI
{
private BuyPropUICtrl ctrl;
private BuyPropModel model;
private FGUI.ZM_Prop_09.com_prop ui;
private int state_ = 0;
public BuyPropUI(BuyPropUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.BuyPropUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "ZM_Prop_09";
uiInfo.assetName = "com_prop";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = false;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.BuyPropModel) as BuyPropModel;
}
protected override void OnClose()
{
GameHelper.showGameUI = true;
}
protected override void OnBind()
{
ui = baseUI as FGUI.ZM_Prop_09.com_prop;
}
protected override void OnOpenBefore(object args)
{
state_ = (int)args;
ui.prop.selectedIndex = state_;
ui.btn_buy.GetChild("text_gold").text = GameHelper.Get101Str(ConfigSystem.GetCommonConf().Purchaseprops);
ui.btn_buy.SetClick(buyItem);
setBtnState(state_);
InitView();
}
void buyItem()
{
if (state_ == 0)
{
}
else if (state_ == 1)
{
}
else if (state_ == 2)
{
}
if (GameHelper.CheckGoldNumber(ConfigSystem.GetCommonConf().Purchaseprops))
{
GameHelper.AddGoldNumber(-ConfigSystem.GetCommonConf().Purchaseprops);
int numbers = GameHelper.GetItemNumber(state_);
numbers++;
GameHelper.SetItemNumber(state_, numbers);
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
GameHelper.ShowTips("purchase_succ", true);
CtrlCloseUI();
}
else
{
GameHelper.ShowTips("no_enough_gold", true);
}
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
//初始化页面逻辑
private void InitView()
{
ui.btn_back.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Close);
});
// ui.btn_buy0.SetClick(() =>
// {
// state_ = 0;
// ui.prop.selectedIndex = 0;
// setBtnState(0);
// });
// ui.btn_buy1.SetClick(() =>
// {
// state_ = 1;
// ui.prop.selectedIndex = 1;
// setBtnState(1);
// });
// ui.btn_buy2.SetClick(() =>
// {
// state_ = 2;
// ui.prop.selectedIndex = 2;
// setBtnState(2);
// });
}
private void setBtnState(int index)
{
// ui.btn_buy0.tab_choose.selectedIndex = index == 0 ? 1 : 0;
// ui.btn_buy1.tab_choose.selectedIndex = index == 1 ? 1 : 0;
// ui.btn_buy2.tab_choose.selectedIndex = index == 2 ? 1 : 0;
}
}
}
namespace RedHotRoast
{
public class BuyPropUI : BaseUI
{
private BuyPropUICtrl ctrl;
private BuyPropModel model;
private FGUI.ZM_Prop_09.com_prop ui;
private int state_ = 0;
public BuyPropUI(BuyPropUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.BuyPropUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "ZM_Prop_09";
uiInfo.assetName = "com_prop";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.BuyPropModel) as BuyPropModel;
}
protected override void OnClose()
{
GameHelper.showGameUI = true;
}
protected override void OnBind()
{
ui = baseUI as FGUI.ZM_Prop_09.com_prop;
}
protected override void OnOpenBefore(object args)
{
state_ = (int)args;
ui.prop.selectedIndex = state_;
ui.btn_buy.GetChild("text_gold").text = GameHelper.Get101Str(ConfigSystem.GetCommonConf().Purchaseprops);
ui.btn_buy.SetClick(buyItem);
setBtnState(state_);
InitView();
}
void buyItem()
{
if (state_ == 0)
{
}
else if (state_ == 1)
{
}
else if (state_ == 2)
{
}
if (GameHelper.CheckGoldNumber(ConfigSystem.GetCommonConf().Purchaseprops))
{
GameHelper.AddGoldNumber(-ConfigSystem.GetCommonConf().Purchaseprops);
int numbers = GameHelper.GetItemNumber(state_);
numbers++;
GameHelper.SetItemNumber(state_, numbers);
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
GameHelper.ShowTips("purchase_succ", true);
CtrlCloseUI();
}
else
{
GameHelper.ShowTips("no_enough_gold", true);
}
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
//初始化页面逻辑
private void InitView()
{
ui.btn_back.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Close);
});
// ui.btn_buy0.SetClick(() =>
// {
// state_ = 0;
// ui.prop.selectedIndex = 0;
// setBtnState(0);
// });
// ui.btn_buy1.SetClick(() =>
// {
// state_ = 1;
// ui.prop.selectedIndex = 1;
// setBtnState(1);
// });
// ui.btn_buy2.SetClick(() =>
// {
// state_ = 2;
// ui.prop.selectedIndex = 2;
// setBtnState(2);
// });
}
private void setBtnState(int index)
{
// ui.btn_buy0.tab_choose.selectedIndex = index == 0 ? 1 : 0;
// ui.btn_buy1.tab_choose.selectedIndex = index == 1 ? 1 : 0;
// ui.btn_buy2.tab_choose.selectedIndex = index == 2 ? 1 : 0;
}
}
}
+12 -15
View File
@@ -184,10 +184,10 @@ namespace RedHotRoast
{
uiCtrlDispatcher.Dispatch(UICtrlMsg.ScAlbumLockUI_Open);
}
else if (unlocklist[random_index] == 2)
{
uiCtrlDispatcher.Dispatch(UICtrlMsg.ChatUnlockUI_Open);
}
// else if (unlocklist[random_index] == 2)
// {
// uiCtrlDispatcher.Dispatch(UICtrlMsg.ChatUnlockUI_Open);
// }
}
}
@@ -196,15 +196,15 @@ namespace RedHotRoast
Setbg();
if (GameHelper.IsGiftSwitch() && GameHelper.GetCommonModel().Assitant == 1 && GameHelper.GetLevel() >= GameHelper.GetCommonModel().AssitantPreview)
{
ui.btn_chat.visible = true;
// ui.btn_chat.visible = true;
SkeletonAnimation ske_pot = FXManager.Instance.SetFx<SkeletonAnimation>(ui.btn_chat.GetChild("ani_parent") as GGraph, Fx_Type.fx_btnchat, ref closeCallback);
ske_pot.state.SetAnimation(0, "animation", true);
ui.btn_chat.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChatChooseUI_Open);
Log.Info("Hall", $"{GameHelper.GetLevel()}/{GameHelper.GetCommonModel().UnlockSecret[1]}/{DataMgr.IsUnlockSecret.Value}");
});
// ui.btn_chat.SetClick(() =>
// {
//
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChatChooseUI_Open);
// Log.Info("Hall", $"{GameHelper.GetLevel()}/{GameHelper.GetCommonModel().UnlockSecret[1]}/{DataMgr.IsUnlockSecret.Value}");
// });
}
}
@@ -522,10 +522,7 @@ namespace RedHotRoast
ui.btn_live.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretUnlockUI_Open);
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LiveUI_Open);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LiveUI_Open);
});
ui.btn_secret.title = "LV." + GameHelper.GetCommonModel().UnlockSecret[1];
ui.btn_secret.SetClick(() =>
@@ -234,7 +234,7 @@ namespace RedHotRoast {
}
void setItemUrl(GLoader loader, int urltype) {
if (urltype == 0)
loader.url = "ui://ZM_Pass_14/bbq_gold02";
loader.url = "ui://ZM_Pass_14/bbq_gold01";
else if (urltype == 4)
loader.url = "ui://ZM_Pass_14/bbq_gold02";
else if (urltype == 1)
@@ -394,7 +394,7 @@ namespace RedHotRoast {
setItemUrl(item.free_item.item_loader, 0);
}
else {
setItemUrl(item.free_item.item_loader, Passportrewards_list[index - 1].Paid_rewards_type);
setItemUrl(item.free_item.item_loader, Passportrewards_list[index - 1].Free_rewards_type);
}
if (Passportrewards_list[index - 1].Paid_rewards_type == 0) {
setItemUrl(item.pay_item.item_loader, 4);
+9 -9
View File
@@ -231,10 +231,10 @@ namespace RedHotRoast
{
uiCtrlDispatcher.Dispatch(UICtrlMsg.ScAlbumLockUI_Open);
}
else if (unlocklist[random_index] == 2)
{
uiCtrlDispatcher.Dispatch(UICtrlMsg.ChatUnlockUI_Open);
}
// else if (unlocklist[random_index] == 2)
// {
// uiCtrlDispatcher.Dispatch(UICtrlMsg.ChatUnlockUI_Open);
// }
}
}
@@ -246,13 +246,13 @@ namespace RedHotRoast
ui.btn_add.t0.Play();
SkeletonAnimation ske_pot = FXManager.Instance.SetFx<SkeletonAnimation>((ui.btn_chat as btn_chat).ani_parent, Fx_Type.fx_btnchat, ref closeCallback);
ske_pot.state.SetAnimation(0, "animation", true);
ui.btn_chat.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChatChooseUI_Open);
});
// ui.btn_chat.SetClick(() =>
// {
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChatChooseUI_Open);
// });
if (GameHelper.IsGiftSwitch() && GameHelper.GetCommonModel().Assitant == 1 && GameHelper.GetLevel() >= GameHelper.GetCommonModel().AssitantPreview)
{
ui.btn_chat.visible = true;
// ui.btn_chat.visible = true;
}
}
private void OnBackToHall(object obj = null)
+140 -140
View File
@@ -1,141 +1,141 @@
using FGUI.ZM_Common_01;
using UnityEngine;
using FairyGUI;
using SGModule.NetKit;
namespace RedHotRoast
{
public class UnlockTipsUI : BaseUI
{
private UnlockTipsUICtrl ctrl;
private UnlockTipsModel model;
private FGUI.ZM_Toast_23.com_unclok_tips ui;
public UnlockTipsUI(UnlockTipsUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.UnlockTipsUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "ZM_Toast_23";
uiInfo.assetName = "com_unclok_tips";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.UnlockTipsModel) as UnlockTipsModel;
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as FGUI.ZM_Toast_23.com_unclok_tips;
}
private int _type = 0;
protected override void OnOpenBefore(object args)
{
if (args == null)
{
return;
}
_type = (int)args;
string key = null;
if (_type == 1) key = "unlocked_secret";
else if (_type == 2) key = "unlocked_live";
else if (_type == 3) key = "unlocked_assitant";
ui.text_tips.text = Language.GetContent(key);;
if (_type == 1)
{
if (DataMgr.IsUnlockSecret.Value == 0)
{
DataMgr.IsUnlockSecret.Value = 1;
}
}
else if (_type == 2)
{
if (DataMgr.IsUnlockLive.Value == 0)
{
DataMgr.IsUnlockLive.Value = 1;
}
}
else if (_type == 3)
{
if (DataMgr.IsUnlockChat.Value == 0)
{
DataMgr.IsUnlockChat.Value = 1;
}
}
string event_type = null;
if (_type == 1) event_type = ADEventTrack.Property.secret_albums_unclock;
else if (_type == 2) event_type = ADEventTrack.Property.live_unclock;
else if (_type == 3) event_type = ADEventTrack.Property.chat_unclock;
TrackKit.SendEvent(ADEventTrack.Special, event_type);
InitView();
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
//初始化页面逻辑
private void InitView()
{
ui.btn_go.SetClick(OnClick);
ui.btn_close.SetClick(OnClick);
}
private void OnClick()
{
if (_type == 1)
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretAlbumsUI_Open);
}
else if (_type == 2)
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LiveUI_Open);
}
else if (_type == 3)
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChatChooseUI_Open);
}
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Close);
}
}
using FGUI.ZM_Common_01;
using UnityEngine;
using FairyGUI;
using SGModule.NetKit;
namespace RedHotRoast
{
public class UnlockTipsUI : BaseUI
{
private UnlockTipsUICtrl ctrl;
private UnlockTipsModel model;
private FGUI.ZM_Toast_23.com_unclok_tips ui;
public UnlockTipsUI(UnlockTipsUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.UnlockTipsUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "ZM_Toast_23";
uiInfo.assetName = "com_unclok_tips";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.UnlockTipsModel) as UnlockTipsModel;
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as FGUI.ZM_Toast_23.com_unclok_tips;
}
private int _type = 0;
protected override void OnOpenBefore(object args)
{
if (args == null)
{
return;
}
_type = (int)args;
string key = null;
if (_type == 1) key = "unlocked_secret";
else if (_type == 2) key = "unlocked_live";
else if (_type == 3) key = "unlocked_assitant";
ui.text_tips.text = Language.GetContent(key);;
if (_type == 1)
{
if (DataMgr.IsUnlockSecret.Value == 0)
{
DataMgr.IsUnlockSecret.Value = 1;
}
}
else if (_type == 2)
{
if (DataMgr.IsUnlockLive.Value == 0)
{
DataMgr.IsUnlockLive.Value = 1;
}
}
else if (_type == 3)
{
if (DataMgr.IsUnlockChat.Value == 0)
{
DataMgr.IsUnlockChat.Value = 1;
}
}
string event_type = null;
if (_type == 1) event_type = ADEventTrack.Property.secret_albums_unclock;
else if (_type == 2) event_type = ADEventTrack.Property.live_unclock;
else if (_type == 3) event_type = ADEventTrack.Property.chat_unclock;
TrackKit.SendEvent(ADEventTrack.Special, event_type);
InitView();
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
//初始化页面逻辑
private void InitView()
{
ui.btn_go.SetClick(OnClick);
ui.btn_close.SetClick(OnClick);
}
private void OnClick()
{
if (_type == 1)
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretAlbumsUI_Open);
}
else if (_type == 2)
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LiveUI_Open);
}
// else if (_type == 3)
// {
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChatChooseUI_Open);
// }
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Close);
}
}
}
@@ -61,8 +61,8 @@ namespace RedHotRoast {
TrackKit.TrackLoginFunnel(LoginFunnelEventType.LoadFinish); //加载完成打点
TextureHelper.imgUrl = CdnURL + "/" + (IsOrganic() ? GetCommonConf().ResVersion : GetCommonConf().ResVersion1) + "/";
LiveVideoManager.videoBaseUrl = CdnURL + "/" + (IsOrganic() ? GetCommonConf().ResVersion : GetCommonConf().ResVersion1) + "/";
TextureHelper.imgUrl = CdnURL + "/" + GetConfigResVersion() + "/";
LiveVideoManager.videoBaseUrl = CdnURL + "/" + GetConfigResVersion() + "/";
// ParseGameConfig();
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close);
@@ -175,7 +175,7 @@ namespace RedHotRoast {
private static List<T> GetConfigWithOrganicFallback<T, TOrganic>() where T : class
{
if (IsOrganic())
if (!IsOrganic())
{
var organicConfig = ConfigLoader.Instance.GetConfig<List<TOrganic>>();
if (organicConfig != null)
@@ -188,6 +188,11 @@ namespace RedHotRoast {
return GetConfig<T>();
}
public static string GetConfigResVersion()
{
return IsOrganic() ? GetCommonConf().ResVersion : GetCommonConf().ResVersion1;
}
public static List<Live> GetLiveConfig()
{
return GetConfigWithOrganicFallback<Live, Live_A>();
+3 -3
View File
@@ -15,7 +15,7 @@ namespace RedHotRoast
// 解密文件:从 src 读出,解密后写到 dst
public static void DecryptFile(string src, string dst)
{
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
var key = ConfigSystem.GetConfigResVersion();
var data = File.ReadAllBytes(src);
// 检查魔法字节
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic)) throw new InvalidDataException("文件未加密或格式错误");
@@ -42,7 +42,7 @@ namespace RedHotRoast
{
var data = File.ReadAllBytes(src);
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
var key = ConfigSystem.GetConfigResVersion();
// 检查魔法字节
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic))
@@ -66,7 +66,7 @@ namespace RedHotRoast
public static byte[] DecryptVideoToBytes(string src)
{
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
var key = ConfigSystem.GetConfigResVersion();
var data = File.ReadAllBytes(src);
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic))
+2 -1
View File
@@ -3,4 +3,5 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AResources_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F37cc348edc804f4cb176b63962c716e7177200_003Fea_003Ffcad8965_003FResources_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASettingsUI_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F6e53694256e748aaa40387bd9aae590a19400_003F8f_003F4404ef43_003FSettingsUI_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASetupCoroutine_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Feaa93d1ff51f46939e13cc06b5754f3d177000_003F3a_003F4f590d28_003FSetupCoroutine_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASRKZBz0SDK_005FUtility_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F0b1e655068fc4085b9a483f586af9fa01fb200_003F43_003Ff38cb8f3_003FSRKZBz0SDK_005FUtility_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASRKZBz0SDK_005FUtility_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F0b1e655068fc4085b9a483f586af9fa01fb200_003F43_003Ff38cb8f3_003FSRKZBz0SDK_005FUtility_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AUnityWebRequest_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ff2936d3fea9f4afd965350486955c95ac600_003Fe6_003F2d5c77ec_003FUnityWebRequest_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>