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; } + } } }