Browse Source

删掉管线后车辆不能移动修改

develop
曹衍涛 4 years ago
parent
commit
1cb37040d2
  1. 4
      Assets/Scripts/Power/Task/TruckMessages.cs

4
Assets/Scripts/Power/Task/TruckMessages.cs

@ -119,6 +119,10 @@ public class TruckMessages : MonoBehaviour
GetComponent<AgentController>().pathFindEnable = false;
else
{
if (GetComponent<WaterSupplier>().waterLineInfos.Contains(data.waterLineID))
{
GetComponent<WaterSupplier>().waterLineInfos.Remove(data.waterLineID);
}
if (GetComponent<WaterSupplier>().waterLineInfos.Count <= 0)
GetComponent<AgentController>().pathFindEnable = true;
}

Loading…
Cancel
Save