From f8989605928b27ea9a84e2e793dc5eef65682566 Mon Sep 17 00:00:00 2001 From: "DESKTOP-KFV16CV\\cyt" <2268162076@qq.com> Date: Tue, 15 Sep 2020 10:35:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=81=AD=E7=81=AB=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E6=9C=AA=E8=A3=85=E5=A4=87=E6=B0=B4=E5=B8=A6=E5=87=BA=E6=B0=B4?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=AF=BB=E8=B7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Common/Cars/AgentController.cs | 7 +++++++ .../DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs | 1 + 2 files changed, 8 insertions(+) diff --git a/Assets/Scripts/Common/Cars/AgentController.cs b/Assets/Scripts/Common/Cars/AgentController.cs index 00238a3..e49ebaf 100644 --- a/Assets/Scripts/Common/Cars/AgentController.cs +++ b/Assets/Scripts/Common/Cars/AgentController.cs @@ -117,6 +117,13 @@ public class AgentController : MonoBehaviour { if (pathFindEnable /*&& !FixedArmFlag*/) { + if (GetComponent()) + { + if (GetComponent().remainlenght<0.5f) + { + return; + } + } begionmove = true; var data = (PathFindingCmdArgs)obj.Data; pointhit = data.hitPoint; diff --git a/Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs b/Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs index 908f08b..11e1e22 100644 --- a/Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs +++ b/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().LineLenght = GetSelfConsumedLength();