fix:1、添加_A表的读取方式

This commit is contained in:
2026-05-19 11:22:58 +08:00
parent a23840e6dc
commit d1ed0d5747
16 changed files with 4855 additions and 4793 deletions
@@ -64,5 +64,7 @@ namespace RedHotRoast
public int MultiModal;
public int[] eggReward;
public int eggCD;
public string ResVersion1;
public int IsOrganic;
}
}
+5 -5
View File
@@ -581,11 +581,11 @@ public static IEnumerator LoadTexture(string fileName, GLoader loader, Action<NT
{
System.Diagnostics.Stopwatch stopwatch = System.Diagnostics.Stopwatch.StartNew();
var levelUnlocks = ConfigSystem.GetConfig<LevelUnlock>();
var FreeImageLibrary_ = ConfigSystem.GetConfig<FreeImageLibrary>();
var ADImageLibrary_ = ConfigSystem.GetConfig<ADImageLibrary>();
var SpecialImageLibrary_ = ConfigSystem.GetConfig<SpecialImageLibrary>();
var VIPImageLibrary_ = ConfigSystem.GetConfig<VIPImageLibrary>();
var levelUnlocks = ConfigSystem.GetLevelUnlockConfig();
var FreeImageLibrary_ = ConfigSystem.GetFreeImageConfig();
var ADImageLibrary_ = ConfigSystem.GetADImageConfig();
var SpecialImageLibrary_ = ConfigSystem.GetSpecialImageConfig();
var VIPImageLibrary_ = ConfigSystem.GetVIPImageConfig();
for (int i = 0; i < GameHelper.GetCommonModel().MultiModal - 1; i++)
{
GetDecryptedImagePath(levelUnlocks[i].Name, FolderNames.AlbumName);
@@ -72,7 +72,7 @@ namespace RedHotRoast
{
CtrlCloseUI();
});
LevelData = ConfigSystem.GetConfig<LevelUnlock>();
LevelData = ConfigSystem.GetLevelUnlockConfig();
// ui.list_.SetVirtual();
// ui.list_.itemRenderer = RendererList;
// ui.list_.numItems = GameHelper.GetLevel() - 1;
@@ -195,29 +195,29 @@ namespace RedHotRoast
{
if (levelunlock_.type == 0)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
file_name = _leveldata.Name;
}
else if (levelunlock_.type == 1)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
file_name = _leveldata.Name;
}
else if (levelunlock_.type == 2)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
file_name = _leveldata.Name;
}
else if (levelunlock_.type == 3)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
file_name = _leveldata.Name;
}
+9 -9
View File
@@ -108,7 +108,7 @@ namespace RedHotRoast
ui.list_albums.RefreshVirtualList();
}, TimeSpan.FromSeconds(0.2f));
LevelData = ConfigSystem.GetConfig<LevelUnlock>();
LevelData = ConfigSystem.GetLevelUnlockConfig();
ui.list_albums.SetVirtual();
ui.btn_close1.SetClick(() => { CtrlCloseUI(); });
InitView();
@@ -360,29 +360,29 @@ namespace RedHotRoast
if (levelunlock_.type == 0)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
ImageName[index] = LevelData[index].Name;
}
else if (levelunlock_.type == 1)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
ImageName[index] = LevelData[index].Name;
}
else if (levelunlock_.type == 2)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
ImageName[index] = LevelData[index].Name;
}
else if (levelunlock_.type == 3)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
ImageName[index] = LevelData[index].Name;
}
+12 -12
View File
@@ -218,8 +218,8 @@ namespace RedHotRoast
{
int level_ = GameHelper.GetLevel() - 2;
if (level_ <= 0) level_ = 0;
if (level_ >= ConfigSystem.GetConfig<LevelUnlock>().Count) level_ = ConfigSystem.GetConfig<LevelUnlock>().Count - 1;
TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetConfig<LevelUnlock>()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
if (level_ >= ConfigSystem.GetLevelUnlockConfig().Count) level_ = ConfigSystem.GetLevelUnlockConfig().Count - 1;
TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetLevelUnlockConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
else
{
@@ -228,26 +228,26 @@ namespace RedHotRoast
{
if (levelunlock_.type == 0)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
else if (levelunlock_.type == 1)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
else if (levelunlock_.type == 2)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
else if (levelunlock_.type == 3)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
}
@@ -255,8 +255,8 @@ namespace RedHotRoast
{
int level_ = GameHelper.GetLevel() - 1;
if (level_ < 0) level_ = 0;
if (level_ >= ConfigSystem.GetConfig<LevelUnlock>().Count) level_ = ConfigSystem.GetConfig<LevelUnlock>().Count - 1;
TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetConfig<LevelUnlock>()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
if (level_ >= ConfigSystem.GetLevelUnlockConfig().Count) level_ = ConfigSystem.GetLevelUnlockConfig().Count - 1;
TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetLevelUnlockConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
}
+1 -1
View File
@@ -123,7 +123,7 @@ namespace RedHotRoast
protected override void OnOpenBefore(object args)
{
LiveConfig = ConfigSystem.GetConfig<Live>();
LiveConfig = ConfigSystem.GetLiveConfig();
ui.list_.itemRenderer = RendererList;
Debug.Log($"LiveConfig.Count==1=== {LiveConfig.Count}");
@@ -262,7 +262,7 @@ namespace RedHotRoast
player.audioOutputMode = VideoAudioOutputMode.None;
// 从配置表取配置(这里还是 List,如果有 Id 字段可改成字典)
LiveConfig = ConfigSystem.GetConfig<Live>()[index];
LiveConfig = ConfigSystem.GetLiveConfig()[index];
livedata_ = PreDownloadManager.GetLiveDataByIndex(LiveConfig, index);
+23 -23
View File
@@ -74,8 +74,8 @@ namespace RedHotRoast
{
int level_ = GameHelper.GetLevel() - 1;
if (level_ < 0) level_ = 0;
if (level_ >= ConfigSystem.GetConfig<LevelUnlock>().Count) level_ = ConfigSystem.GetConfig<LevelUnlock>().Count - 1;
TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetConfig<LevelUnlock>()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
if (level_ >= ConfigSystem.GetLevelUnlockConfig().Count) level_ = ConfigSystem.GetLevelUnlockConfig().Count - 1;
TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetLevelUnlockConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
else
{
@@ -84,26 +84,26 @@ namespace RedHotRoast
{
if (levelunlock_.type == 0)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
else if (levelunlock_.type == 1)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
else if (levelunlock_.type == 2)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
else if (levelunlock_.type == 3)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
}
@@ -111,8 +111,8 @@ namespace RedHotRoast
{
int level_ = GameHelper.GetLevel() - 1;
if (level_ < 0) level_ = 0;
if (level_ >= ConfigSystem.GetConfig<LevelUnlock>().Count) level_ = ConfigSystem.GetConfig<LevelUnlock>().Count - 1;
TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetConfig<LevelUnlock>()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
if (level_ >= ConfigSystem.GetLevelUnlockConfig().Count) level_ = ConfigSystem.GetLevelUnlockConfig().Count - 1;
TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetLevelUnlockConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
}
}
}
@@ -126,7 +126,7 @@ namespace RedHotRoast
Debug.Log(GetNextSpecialLevel());
next_level = GetNextSpecialLevel();
var levelUnlock_ = ConfigSystem.GetConfig<LevelUnlock>()[next_level];
var levelUnlock_ = ConfigSystem.GetLevelUnlockConfig()[next_level];
if (levelUnlock_.LeveType == 1)
ui.text_levelType.text = "Special level";
else if (levelUnlock_.LeveType == 2) ui.text_levelType.text = "VIP level";
@@ -422,29 +422,29 @@ namespace RedHotRoast
{
if (levelunlock_.type == 0)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
file_name = _leveldata.Name;
}
else if (levelunlock_.type == 1)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
file_name = _leveldata.Name;
}
else if (levelunlock_.type == 2)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
file_name = _leveldata.Name;
}
else if (levelunlock_.type == 3)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
file_name = _leveldata.Name;
}
@@ -578,7 +578,7 @@ namespace RedHotRoast
successData_.ch_number = (int)successData_.ch_number;
// 修改后的代码
var levelDataList = ConfigSystem.GetConfig<LevelUnlock>();
var levelDataList = ConfigSystem.GetLevelUnlockConfig();
var levelIndex = successData_.level - 1;
// 确保索引不超出范围,如果超出则使用最后一个元素
@@ -628,7 +628,7 @@ namespace RedHotRoast
private int GetNextSpecialLevel()
{
var now_level = successData_.level;
var list_ = ConfigSystem.GetConfig<LevelUnlock>();
var list_ = ConfigSystem.GetLevelUnlockConfig();
for (var i = now_level; i < list_.Count; i++)
if (list_[i].LeveType != 0)
return i;
@@ -51,9 +51,9 @@ namespace RedHotRoast
InitView();
// DOVirtual.DelayedCall(0.2f, () =>
// {
// if (GameHelper.GetLevel() - 1 < ConfigSystem.GetConfig<LevelUnlock>().Count&&GameHelper.IsGiftSwitch())
// if (GameHelper.GetLevel() - 1 < ConfigSystem.GetLevelUnlockConfig().Count&&GameHelper.IsGiftSwitch())
// {
// LevelUnlock levelUnlock_ = ConfigSystem.GetConfig<LevelUnlock>()[GameHelper.GetLevel() - 1];
// LevelUnlock levelUnlock_ = ConfigSystem.GetLevelUnlockConfig()[GameHelper.GetLevel() - 1];
// if (levelUnlock_.LeveType != 0)
// {
// if (!DataMgr.LevelUnlockList.Value.Contains(GameHelper.GetLevel() - 1))
+12 -12
View File
@@ -593,7 +593,7 @@ namespace RedHotRoast
{
if (GameHelper.GetLevel() < GameHelper.GetCommonModel().MultiModal)
{
TextureHelper.setGamebg(ConfigSystem.GetConfig<LevelUnlock>()[GameHelper.GetLevel() - 1].Name);
TextureHelper.setGamebg(ConfigSystem.GetLevelUnlockConfig()[GameHelper.GetLevel() - 1].Name);
}
else
{
@@ -603,27 +603,27 @@ namespace RedHotRoast
{
if (levelunlock_.type == 0)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
TextureHelper.setGamebg(_leveldata.Name);
}
else if (levelunlock_.type == 1)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
TextureHelper.setGamebg(_leveldata.Name);
}
else if (levelunlock_.type == 2)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
TextureHelper.setGamebg(_leveldata.Name);
}
else if (levelunlock_.type == 3)
{
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
TextureHelper.setGamebg(_leveldata.Name);
}
}
@@ -633,13 +633,13 @@ namespace RedHotRoast
{
return;
}
if (GameHelper.GetLevel() - 1 < ConfigSystem.GetConfig<LevelUnlock>().Count)
if (GameHelper.GetLevel() - 1 < ConfigSystem.GetLevelUnlockConfig().Count)
{
TextureHelper.setGamebg(ConfigSystem.GetConfig<LevelUnlock>()[GameHelper.GetLevel() - 1].Name);
TextureHelper.setGamebg(ConfigSystem.GetLevelUnlockConfig()[GameHelper.GetLevel() - 1].Name);
}
else
{
TextureHelper.setGamebg(ConfigSystem.GetConfig<LevelUnlock>()[ConfigSystem.GetConfig<LevelUnlock>().Count - 1].Name);
TextureHelper.setGamebg(ConfigSystem.GetLevelUnlockConfig()[ConfigSystem.GetLevelUnlockConfig().Count - 1].Name);
}
}
}
@@ -270,10 +270,10 @@ namespace RedHotRoast
int startIndex = "secret_albnums".Length;
string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符
int suffix_num = int.Parse(suffix);
var model = ConfigSystem.GetConfig<SecretAlbums>()[suffix_num];
var model = ConfigSystem.GetSecretAlbumsConfig()[suffix_num];
if (model.PayType == (int)UnlockPayType.Pay && !GameHelper.isVipUnlock)
{
purch_number = ConfigSystem.GetConfig<SecretAlbums>()[suffix_num].DiscountPrice.ToString();
purch_number = ConfigSystem.GetSecretAlbumsConfig()[suffix_num].DiscountPrice.ToString();
}
GameHelper.isVipUnlock = false;
}
@@ -315,7 +315,7 @@ namespace RedHotRoast
var eventName = GameHelper.IsAdModelOfPay() ? ADEventTrack.Event : ADEventTrack.MaxPayEvent;
TrackKit.SendEvent(eventName, ADEventTrack.Property.shop_show);
_secretData = ConfigSystem.GetConfig<SecretAlbums>();
_secretData = ConfigSystem.GetSecretAlbumsConfig();
InitView();
}
@@ -67,7 +67,7 @@ namespace RedHotRoast
loader_list.Add(ui.com_loader.GetChild("loader") as GLoader);
}
levelUnlock_ = ConfigSystem.GetConfig<LevelUnlock>()[level_];
levelUnlock_ = ConfigSystem.GetLevelUnlockConfig()[level_];
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, levelUnlock_.Name, (s) =>
{
TextureHelper.SetImageBlur(ui.com_loader.GetChild("loader") as GLoader);
@@ -118,7 +118,7 @@ namespace RedHotRoast
private void RefreshVip(object a = null)
{
bool have_special = GameHelper.GetVipPrivilege(Subscription.SLVLevel.As<int>());
SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetConfig<SpecialImageLibrary>()[DataMgr.LevelUnlockSpecial.Value];
SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetSpecialImageConfig()[DataMgr.LevelUnlockSpecial.Value];
if (special_ImageLibrary.State == 1 && !have_special) TextureHelper.SetImageBlur(ui.item_2.com_pic.picture);
else TextureHelper.CancelImageBlur(ui.item_2.com_pic.picture);
@@ -168,7 +168,7 @@ namespace RedHotRoast
}
bool have_vip = GameHelper.GetVipPrivilege(Subscription.VipLevel.As<int>());
VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetConfig<VIPImageLibrary>()[DataMgr.LevelUnlockVIP.Value];
VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetVIPImageConfig()[DataMgr.LevelUnlockVIP.Value];
if (vip_ImageLibrary.State == 1 && !have_vip) TextureHelper.SetImageBlur(ui.item_3.com_pic.picture);
else TextureHelper.CancelImageBlur(ui.item_3.com_pic.picture);
if (have_vip)
@@ -225,7 +225,7 @@ namespace RedHotRoast
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<SpecialImageLibrary>()) + "..................");
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<VIPImageLibrary>()) + "..................");
ConfigSystem.GetConfig<VIPImageLibrary>();
ConfigSystem.GetVIPImageConfig();
loader_list.Add(ui.item_0.com_pic.picture);
loader_list.Add(ui.item_1.com_pic.picture);
@@ -270,7 +270,7 @@ namespace RedHotRoast
}
FreeImageLibrary free_ImageLibrary = ConfigSystem.GetConfig<FreeImageLibrary>()[DataMgr.LevelUnlockFree.Value];
FreeImageLibrary free_ImageLibrary = ConfigSystem.GetFreeImageConfig()[DataMgr.LevelUnlockFree.Value];
ui.item_0.btn_unlock.pay_type.selectedIndex = 2;
ui.item_0_re.btn_unlock.visible = false;
TextureHelper.SetImgLoader(ui.item_0.com_pic.picture, free_ImageLibrary.Name, (s) =>
@@ -279,7 +279,7 @@ namespace RedHotRoast
}, "LevelAlbums/", FolderNames.AlbumName);
int Free_Alubum_1 = PlayerPrefs.GetInt("Free_Alubum_1", -1);
FreeImageLibrary free_ImageLibrary_re = ConfigSystem.GetConfig<FreeImageLibrary>()[Free_Alubum_1];
FreeImageLibrary free_ImageLibrary_re = ConfigSystem.GetFreeImageConfig()[Free_Alubum_1];
TextureHelper.SetImgLoader(ui.item_0_re.com_pic.picture, free_ImageLibrary_re.Name, (s) =>
{
if (free_ImageLibrary_re.State == 1) TextureHelper.SetImageBlur(ui.item_0_re.com_pic.picture);
@@ -315,7 +315,7 @@ namespace RedHotRoast
ADImageLibrary ad_ImageLibrary = ConfigSystem.GetConfig<ADImageLibrary>()[DataMgr.LevelUnlockAD.Value];
ADImageLibrary ad_ImageLibrary = ConfigSystem.GetADImageConfig()[DataMgr.LevelUnlockAD.Value];
TextureHelper.SetImgLoader(ui.item_1.com_pic.picture, ad_ImageLibrary.Name, (s) =>
{
if (ad_ImageLibrary.State == 1) TextureHelper.SetImageBlur(ui.item_1.com_pic.picture);
@@ -337,7 +337,7 @@ namespace RedHotRoast
bool have_special = GameHelper.GetVipPrivilege(Subscription.SLVLevel.As<int>());
SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetConfig<SpecialImageLibrary>()[DataMgr.LevelUnlockSpecial.Value];
SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetSpecialImageConfig()[DataMgr.LevelUnlockSpecial.Value];
TextureHelper.SetImgLoader(ui.item_2.com_pic.picture, special_ImageLibrary.Name, (s) =>
{
if (special_ImageLibrary.State == 1 && !have_special) TextureHelper.SetImageBlur(ui.item_2.com_pic.picture);
@@ -389,7 +389,7 @@ namespace RedHotRoast
}
bool have_vip = GameHelper.GetVipPrivilege(Subscription.VipLevel.As<int>());
VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetConfig<VIPImageLibrary>()[DataMgr.LevelUnlockVIP.Value];
VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetVIPImageConfig()[DataMgr.LevelUnlockVIP.Value];
TextureHelper.SetImgLoader(ui.item_3.com_pic.picture, vip_ImageLibrary.Name, (s) =>
{
+62 -2
View File
@@ -59,8 +59,8 @@ namespace RedHotRoast {
TrackKit.TrackLoginFunnel(LoginFunnelEventType.LoadFinish); //加载完成打点
TextureHelper.imgUrl = CdnURL + "/" + ConfigSystem.GetCommonConf().ResVersion + "/";
LiveVideoManager.videoBaseUrl = CdnURL + "/" + ConfigSystem.GetCommonConf().ResVersion + "/";
TextureHelper.imgUrl = CdnURL + "/" + (IsOrganic() ? GetCommonConf().ResVersion : GetCommonConf().ResVersion1) + "/";
LiveVideoManager.videoBaseUrl = CdnURL + "/" + (IsOrganic() ? GetCommonConf().ResVersion : GetCommonConf().ResVersion1) + "/";
// ParseGameConfig();
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close);
@@ -116,6 +116,66 @@ namespace RedHotRoast {
return ConfigLoader.Instance.GetConfig<List<T>>() ?? new List<T>();
}
private static bool IsOrganic()
{
bool b = false;
if (GameHelper.IsGiftSwitch() && SuperApplication.Instance.attribution == "organic")
{
b = GetCommonConf().IsOrganic == 1;
}
return b;
}
private static List<T> GetConfigWithOrganicFallback<T, TOrganic>() where T : class
{
if (IsOrganic())
{
var organicConfig = ConfigLoader.Instance.GetConfig<List<TOrganic>>();
if (organicConfig != null)
{
var json = Newtonsoft.Json.JsonConvert.SerializeObject(organicConfig);
return Newtonsoft.Json.JsonConvert.DeserializeObject<List<T>>(json);
}
}
return GetConfig<T>();
}
public static List<Live> GetLiveConfig()
{
return GetConfigWithOrganicFallback<Live, Live_A>();
}
public static List<SecretAlbums> GetSecretAlbumsConfig()
{
return GetConfigWithOrganicFallback<SecretAlbums, SecretAlbums_A>();
}
public static List<FreeImageLibrary> GetFreeImageConfig()
{
return GetConfigWithOrganicFallback<FreeImageLibrary, FreeImageLibrary_A>();
}
public static List<ADImageLibrary> GetADImageConfig()
{
return GetConfigWithOrganicFallback<ADImageLibrary, ADImageLibrary_A>();
}
public static List<SpecialImageLibrary> GetSpecialImageConfig()
{
return GetConfigWithOrganicFallback<SpecialImageLibrary, SpecialImageLibrary_A>();
}
public static List<VIPImageLibrary> GetVIPImageConfig()
{
return GetConfigWithOrganicFallback<VIPImageLibrary, VIPImageLibrary_A>();
}
public static List<LevelUnlock> GetLevelUnlockConfig()
{
return GetConfigWithOrganicFallback<LevelUnlock, LevelUnlock_A>();
}
public override void Dispose() {
base.Dispose();
RemoveListener();
+18 -18
View File
@@ -14,7 +14,7 @@ namespace RedHotRoast
public static void InitializeLiveData()
{
var liveConfigList = ConfigSystem.GetConfig<Live>();
var liveConfigList = ConfigSystem.GetLiveConfig();
Debug.Log($"[预下载视频 数据初始化]-0-----{DataMgr.LiveDataDic.Value.Count}");
@@ -57,7 +57,7 @@ namespace RedHotRoast
private static IEnumerator DownloadVideosCoroutine()
{
var liveConfigList = ConfigSystem.GetConfig<Live>();
var liveConfigList = ConfigSystem.GetLiveConfig();
var liveDic = DataMgr.LiveDataDic.Value;
var downloadNameList = new List<string>();
@@ -132,7 +132,7 @@ namespace RedHotRoast
public static void StartDownloadSecretPicture()
{
var liveConfigList = ConfigSystem.GetConfig<SecretAlbums>();
var liveConfigList = ConfigSystem.GetSecretAlbumsConfig();
var liveList = DataMgr.SecretUnlockList.Value;
var downloadNameList = new List<string>();
@@ -183,10 +183,10 @@ namespace RedHotRoast
if (Free_Alubum_0 >= 0) return;
var FreeImageLibrary_ = ConfigSystem.GetConfig<FreeImageLibrary>();
var ADImageLibrary_ = ConfigSystem.GetConfig<ADImageLibrary>();
var SpecialImageLibrary_ = ConfigSystem.GetConfig<SpecialImageLibrary>();
var VIPImageLibrary_ = ConfigSystem.GetConfig<VIPImageLibrary>();
var FreeImageLibrary_ = ConfigSystem.GetFreeImageConfig();
var ADImageLibrary_ = ConfigSystem.GetADImageConfig();
var SpecialImageLibrary_ = ConfigSystem.GetSpecialImageConfig();
var VIPImageLibrary_ = ConfigSystem.GetVIPImageConfig();
List<int> free_level_list = new List<int>();
List<int> ad_level_list = new List<int>();
@@ -204,14 +204,14 @@ namespace RedHotRoast
if (Free_Alubum_0 < 0)
{
HashSet<int> levelIds = new HashSet<int>(free_level_list);
List<FreeImageLibrary> filtered = ConfigSystem.GetConfig<FreeImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
List<FreeImageLibrary> filtered = ConfigSystem.GetFreeImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
if (filtered.Count > 0)
{
Free_Alubum_0 = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
}
else
{
Free_Alubum_0 = ConfigSystem.GetConfig<FreeImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<FreeImageLibrary>().Count)].id;
Free_Alubum_0 = ConfigSystem.GetFreeImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetFreeImageConfig().Count)].id;
}
free_level_list.Add(Free_Alubum_0);
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
@@ -219,14 +219,14 @@ namespace RedHotRoast
if (Free_Alubum_1 < 0)
{
HashSet<int> levelIds = new HashSet<int>(free_level_list);
List<FreeImageLibrary> filtered = ConfigSystem.GetConfig<FreeImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
List<FreeImageLibrary> filtered = ConfigSystem.GetFreeImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
if (filtered.Count > 0)
{
Free_Alubum_1 = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
}
else
{
Free_Alubum_1 = ConfigSystem.GetConfig<FreeImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<FreeImageLibrary>().Count)].id;
Free_Alubum_1 = ConfigSystem.GetFreeImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetFreeImageConfig().Count)].id;
}
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
}
@@ -235,14 +235,14 @@ namespace RedHotRoast
if (AD_Alubum < 0)
{
HashSet<int> levelIds = new HashSet<int>(ad_level_list);
List<ADImageLibrary> filtered = ConfigSystem.GetConfig<ADImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
List<ADImageLibrary> filtered = ConfigSystem.GetADImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
if (filtered.Count > 0)
{
AD_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
}
else
{
AD_Alubum = ConfigSystem.GetConfig<ADImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<ADImageLibrary>().Count)].id;
AD_Alubum = ConfigSystem.GetADImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetADImageConfig().Count)].id;
}
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
}
@@ -250,14 +250,14 @@ namespace RedHotRoast
if (Spec_Alubum < 0)
{
HashSet<int> levelIds = new HashSet<int>(special_level_list);
List<SpecialImageLibrary> filtered = ConfigSystem.GetConfig<SpecialImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
List<SpecialImageLibrary> filtered = ConfigSystem.GetSpecialImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
if (filtered.Count > 0)
{
Spec_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
}
else
{
Spec_Alubum = ConfigSystem.GetConfig<SpecialImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<SpecialImageLibrary>().Count)].id;
Spec_Alubum = ConfigSystem.GetSpecialImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetSpecialImageConfig().Count)].id;
}
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
}
@@ -265,14 +265,14 @@ namespace RedHotRoast
if (Vip_Alubum < 0)
{
HashSet<int> levelIds = new HashSet<int>(vip_level_list);
List<VIPImageLibrary> filtered = ConfigSystem.GetConfig<VIPImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
List<VIPImageLibrary> filtered = ConfigSystem.GetVIPImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
if (filtered.Count > 0)
{
Vip_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
}
else
{
Vip_Alubum = ConfigSystem.GetConfig<VIPImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<VIPImageLibrary>().Count)].id;
Vip_Alubum = ConfigSystem.GetVIPImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetVIPImageConfig().Count)].id;
}
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
}
@@ -346,7 +346,7 @@ namespace RedHotRoast
public static void StartDownloadLivePicture()
{
var liveConfigList = ConfigSystem.GetConfig<Live>();
var liveConfigList = ConfigSystem.GetLiveConfig();
var liveList = DataMgr.SecretUnlockList.Value;
var downloadNameList = new List<string>();