From 076f1210275e31ef2b51601a215be66f55b54913 Mon Sep 17 00:00:00 2001 From: "DESKTOP-KFV16CV\\cyt" <2268162076@qq.com> Date: Tue, 9 Mar 2021 10:18:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=81=AB=E7=86=84=E7=81=AD?= =?UTF-8?q?=E5=90=8E=E5=A4=8D=E7=87=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WaterFightFire/FireFightNormal.cs | 15 +++++++++++++++ .../WaterFightFire/SpreadFireController.cs | 6 ++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/FireFightNormal.cs b/Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/FireFightNormal.cs index 835e9b8..87142f3 100644 --- a/Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/FireFightNormal.cs +++ b/Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/FireFightNormal.cs @@ -98,6 +98,20 @@ public class FireFightNormal : MonoBehaviour if (SpreadFireController.fireStruckContainDic[mainFireId].Contains(this)) { SpreadFireController.fireStruckContainDic[mainFireId].Remove(this); + if (SpreadFireController.fireStruckContainDic[mainFireId].Count<1) + { + EntitiesManager.Instance.DeleteObj(EntitiesManager.Instance.GetEntityByID(mainFireId)); + if (GameSettings.othersSettings.mode != Mode.DisasterManagement) + { + if (CurrentUserInfo.room!=null&& CurrentUserInfo.mySelf.Id == CurrentUserInfo.room.Owner.UserInfo.Id) + { + BaseNetworkSyncDate arg = new BaseNetworkSyncDate(); + arg.SendUserID = CurrentUserInfo.mySelf.Id; + arg.gameObjID = mainFireId; + NetworkManager.Default.SendAsync("OBJ_DELECT_SYNC", arg); + } + } + } } } @@ -187,6 +201,7 @@ public class FireFightNormal : MonoBehaviour transform.GetChild(i).gameObject.SetActive(false); } GetComponent().enabled = false; + SpreadFireController.fireStruckContainDic[baseinfo.gameObjID].Remove(this); } } diff --git a/Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/SpreadFireController.cs b/Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/SpreadFireController.cs index a70bdf8..a83367d 100644 --- a/Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/SpreadFireController.cs +++ b/Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/SpreadFireController.cs @@ -188,9 +188,10 @@ public class SpreadFireController : MonoBehaviour } } } - + //如果可以控制住 - if (waterControlArea >= fireArea) + + if (waterControlArea > fireArea) { mainfire.GetComponent().BeController = true; @@ -199,6 +200,7 @@ public class SpreadFireController : MonoBehaviour { mainfire.GetComponent().BeController = false; } + } } }