Browse Source

修改火熄灭后复燃

master
曹衍涛 4 years ago
parent
commit
076f121027
  1. 15
      Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/FireFightNormal.cs
  2. 4
      Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/SpreadFireController.cs

15
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<Collider>().enabled = false;
SpreadFireController.fireStruckContainDic[baseinfo.gameObjID].Remove(this);
}
}

4
Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/SpreadFireController.cs

@ -190,7 +190,8 @@ public class SpreadFireController : MonoBehaviour
}
//如果可以控制住
if (waterControlArea >= fireArea)
if (waterControlArea > fireArea)
{
mainfire.GetComponent<FireSpreadCtrl>().BeController = true;
@ -199,6 +200,7 @@ public class SpreadFireController : MonoBehaviour
{
mainfire.GetComponent<FireSpreadCtrl>().BeController = false;
}
}
}
}

Loading…
Cancel
Save