Browse Source

1、退出演练进入灾情管理,无法保存灾情

2、灭火机器人没有装备水带也能行走问题修改
develop
曹衍涛 4 years ago
parent
commit
7d7407b8bc
  1. 3
      Assets/Scripts/Common/Disasters/FireSpread/FireSpreadPanel.cs
  2. 4
      Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs

3
Assets/Scripts/Common/Disasters/FireSpread/FireSpreadPanel.cs

@ -81,8 +81,9 @@ public class FireSpreadPanel : BaseAttributeSet {
Close();
}
private void OnDestroy()
public override void OnDestroy()
{
base.OnDestroy();
InitialSizeDropdown.onValueChanged.RemoveListener(InitialSizeSet);
roadSpread.onValueChanged.RemoveListener(RoadSpreadSelected);

4
Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs

@ -140,6 +140,10 @@ public class FireRobotLayWaterHose : MonoBehaviour
// Update is called once per frame
void Update()
{
if (remainlenght<=0.5f)
{
agent.SetDestination(transform.position);
}
if (flag && agent.velocity.magnitude > 0) //开启“铺设水带”,并且开始寻路时才会执行
{
HasUseNum = Mathf.CeilToInt(GetSelfConsumedLength() / 20);

Loading…
Cancel
Save