From b1f98c42a6b859b35c26e0722efb38a6e9c215be Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 22 十月 2025 11:25:33 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/Battle/BattleManager.cs | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/Main/System/Battle/BattleManager.cs b/Main/System/Battle/BattleManager.cs
index 732c309..906f27b 100644
--- a/Main/System/Battle/BattleManager.cs
+++ b/Main/System/Battle/BattleManager.cs
@@ -30,7 +30,7 @@
public Action<string, BattleField> onBattleFieldCreate;
- public Action<string, BattleField> onBattleFieldDestroy;
+ public Action onBattleFieldDestroy;
public bool isWaitServerStory = false; //涓荤嚎绛夋湇鍔$鍥炴姤 0425
@@ -532,7 +532,7 @@
GameObject.DestroyImmediate(battleField.battleRootNode.gameObject);
- onBattleFieldDestroy?.Invoke(battleField.guid, battleField);
+ onBattleFieldDestroy?.Invoke();
}
@@ -605,4 +605,21 @@
}
return false;
}
+
+ // 鑾峰彇褰撳墠姝e湪鏄剧ず鐨勬垬鏂楀満鏅悕绉帮紝濡傛灉娌℃湁鍒欒繑鍥炵┖瀛楃涓�
+ public string GetActiveBattleName()
+ {
+ foreach (var kvp in battleFields)
+ {
+ BattleField battleField = kvp.Value;
+ if (battleField == null)
+ continue;
+
+ var battleName = battleField.ToString();
+ if (BattleConst.battleNameToWinName.ContainsKey(battleName)
+ && UIManager.Instance.IsOpened(BattleConst.battleNameToWinName[battleName]))
+ return battleName;
+ }
+ return "";
+ }
}
\ No newline at end of file
--
Gitblit v1.8.0