fix:1、同步ios修复的bug

This commit is contained in:
2026-07-01 10:26:18 +08:00
parent 6ff428bdf2
commit af7617c352
1080 changed files with 2059 additions and 484310 deletions
+16 -5
View File
@@ -1,6 +1,7 @@
using UnityEngine;
using System.Collections.Generic;
using ChillConnect;
using IgnoreOPS;
public class LevelManager : MonoBehaviour
{
@@ -48,13 +49,13 @@ public class LevelManager : MonoBehaviour
Debug.LogError("关卡ID必须大于0");
return false;
}
if (levelId > 500)
var gameConfigs = ConfigSystem.GetConfig<ArrowGameConfigModel>().DataList;
if (levelId >= gameConfigs.Count)
{
levelId = 500;
levelId = gameConfigs.Count - 1;
}
TextAsset jsonFile = Resources.Load<TextAsset>($"{LevelResourcePath}{levelId}");
var jsonFile = gameConfigs[levelId];
if (jsonFile == null)
{
@@ -62,7 +63,17 @@ public class LevelManager : MonoBehaviour
return false;
}
CurrentLevel = JsonUtility.FromJson<LevelConfig>(jsonFile.text);
var curlevelConfig = new LevelConfig()
{
levelId = jsonFile.id,
levelName = jsonFile.levelName,
gridRows = jsonFile.gridRows,
gridCols = jsonFile.gridCols,
pointSpacing = jsonFile.pointSpacing,
arrows = SerializeUtil.ToObject<List<ArrowConfig>>(jsonFile.arrows)
};
CurrentLevel = curlevelConfig;
if (CurrentLevel == null || CurrentLevel.arrows == null)
{