Browse Source

灭火机器人未装备水带出水不能寻路

develop
曹衍涛 4 years ago
parent
commit
f898960592
  1. 7
      Assets/Scripts/Common/Cars/AgentController.cs
  2. 1
      Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs

7
Assets/Scripts/Common/Cars/AgentController.cs

@ -117,6 +117,13 @@ public class AgentController : MonoBehaviour
{
if (pathFindEnable /*&& !FixedArmFlag*/)
{
if (GetComponent<FireRobotController>())
{
if (GetComponent<FireRobotLayWaterHose>().remainlenght<0.5f)
{
return;
}
}
begionmove = true;
var data = (PathFindingCmdArgs)obj.Data;
pointhit = data.hitPoint;

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

@ -146,6 +146,7 @@ public class FireRobotLayWaterHose : MonoBehaviour
if (remainlenght <= 0.5f)
{
agent.SetDestination(transform.position);
return;
}
HasUseNum = Mathf.CeilToInt(GetSelfConsumedLength() / 20);
ParentLayHose.GetComponent<ParentLayWaterHoseMsg>().LineLenght = GetSelfConsumedLength();

Loading…
Cancel
Save