From 71365e5c15d81759c04d7aab953fa757fb183f9b Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 12 十一月 2025 18:54:59 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/Battle/BattleManager.cs | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Main/System/Battle/BattleManager.cs b/Main/System/Battle/BattleManager.cs
index 827433e..64c81a5 100644
--- a/Main/System/Battle/BattleManager.cs
+++ b/Main/System/Battle/BattleManager.cs
@@ -2,6 +2,7 @@
using UnityEngine;
using LitJson;
using System;
+using System.Linq;
public class BattleManager : GameSystemManager<BattleManager>
{
@@ -662,13 +663,13 @@
public void DestroyAllBattleField()
{
- foreach (var kvp in battleFields)
+ var battleFieldsList = battleFields.Values.ToList();
+ foreach (var battleField in battleFieldsList)
{
- BattleField battleField = kvp.Value;
if (battleField == null)
continue;
-
- DestroyBattleField(battleField);
+ battleField.Destroy();
}
}
+
}
\ No newline at end of file
--
Gitblit v1.8.0