fix:1、添加H5

This commit is contained in:
barry
2026-05-25 09:45:16 +08:00
parent 8144a27fdb
commit 5f68fe42c1
276 changed files with 46771 additions and 27478 deletions
+45 -1
View File
@@ -10,7 +10,9 @@ using UnityEngine;
namespace RedHotRoast {
public class ConfigSystem : BaseSystem {
public static string web_through_str;
public static List<GameUrls> light_weblist = new List<GameUrls>();
public static List<GameUrls> dark_weblist = new List<GameUrls>();
public ConfigSystem(bool isAutoInit = true) {
if (isAutoInit) {
Init();
@@ -104,6 +106,48 @@ namespace RedHotRoast {
}
ConfigLoader.Instance.AddConfig(gameConfigModel);
SetGameUrlConfig();
}
private static List<GameUrls> data_new;
public static void SetGameUrlConfig()
{
light_weblist.Clear();
dark_weblist.Clear();
web_through_str = "";
data_new = GetConfig<GameUrls>();
List<int> type_list = new List<int>();
for (int i = 0; i < data_new.Count; i++)
{
if (data_new[i].webType == 2)
{
if (GameHelper.IsGiftSwitch() && (data_new[i].isMagic == 1)) light_weblist.Add(data_new[i]);
else if (!GameHelper.IsGiftSwitch() && (data_new[i].isMagic == 0)) light_weblist.Add(data_new[i]);
}
else
{
dark_weblist.Add(data_new[i]);
if (!type_list.Contains(data_new[i].wvType))
{
web_through_str += data_new[i].wvthrough;
web_through_str += "|";
type_list.Add(data_new[i].wvType);
}
}
}
web_through_str.Remove(web_through_str.Length - 1);
Debug.Log("light_weblist-----" + light_weblist.Count);
Debug.Log("dark_weblist-----"+ dark_weblist.Count);
Debug.Log("////////////////////////");
}
#endregion