From 007fbd542c30f5fa8308128aac26ce6584b3067a Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期二, 17 六月 2025 17:13:47 +0800
Subject: [PATCH] 117 【武将】武将系统 武将的属性部分 部分战斗的内容

---
 Main/System/Battle/BattleObject/BattleObjMgr.cs |   47 ++++++++++++++++++++++++++++-------------------
 1 files changed, 28 insertions(+), 19 deletions(-)

diff --git a/Main/System/Battle/BattleObject/BattleObjMgr.cs b/Main/System/Battle/BattleObject/BattleObjMgr.cs
index a01879f..8a95deb 100644
--- a/Main/System/Battle/BattleObject/BattleObjMgr.cs
+++ b/Main/System/Battle/BattleObject/BattleObjMgr.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
@@ -9,26 +10,8 @@
     private Dictionary<int, BattleObject> redCampDict = new Dictionary<int, BattleObject>();
     private Dictionary<int, BattleObject> blueCampDict = new Dictionary<int, BattleObject>();
 
-    public void Init(int _levelId, TeamBase _redTeam, TeamBase _blueTeam = null)
+    public void Init(TeamBase _redTeam, TeamBase _blueTeam)
     {
-        if (_levelId == 0 && _blueTeam == null)
-        {
-            Debug.LogError("BattleObjMgr Init Error: _levelId == 0 && _blueTeam == null 鍏冲崱id娌℃湁(涓嶆槸PVE) 涔熸病鏈夎摑鑹查槦浼嶄俊鎭紙涔熶笉鏄疨VP锛�)");
-            return;
-        }
-
-        if (_levelId != 0 && _blueTeam != null)
-        {
-            Debug.LogError("BattleObjMgr Init Error: _levelId!= 0 && _blueTeam != null 鍏冲崱id鏈�(鏄疨VE) 涔熸湁钃濊壊闃熶紞淇℃伅锛堜篃涓嶆槸PVP锛�)");
-            return;
-        }
-
-        if (_levelId != 0)
-        {
-            _blueTeam = new TeamBase();
-            _blueTeam.InitByLevelId(_levelId);
-        }
-
         CreateTeam(redCampDict, _redTeam);
         CreateTeam(blueCampDict, _blueTeam);
     } 
@@ -80,4 +63,30 @@
             item.Value.Run();
         }
     }
+
+    public void ResumeGame()
+    {
+        foreach (var item in redCampList)
+        {
+            item.ResumeGame();
+        }
+
+        foreach (var item in blueCampList)
+        {
+            item.ResumeGame();
+        }
+    }
+
+    public void PauseGame()
+    {
+        foreach (var item in redCampList)
+        {
+            item.PauseGame();
+        }
+
+        foreach (var item in blueCampList)
+        {
+            item.PauseGame();
+        }
+    }
 }
\ No newline at end of file

--
Gitblit v1.8.0