This commit is contained in:
账号名 2023-11-24 09:46:40 +08:00
parent f12992418b
commit 5db8b045d9
1 changed files with 7 additions and 1 deletions

View File

@ -159,6 +159,12 @@ public class EquipmentCommon : MonoBehaviour
} }
} }
private void Update()
{
StartMoveObjectAlongPath();
}
/// <summary> /// <summary>
/// 已有路径 /// 已有路径
/// </summary> /// </summary>
@ -177,7 +183,7 @@ public class EquipmentCommon : MonoBehaviour
Vector3 _positions = positions.Dequeue(); Vector3 _positions = positions.Dequeue();
UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent<UnmannedAerialVehicleManage>(); UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent<UnmannedAerialVehicleManage>();
if (unmannedAerialVehicleManage) if (unmannedAerialVehicleManage)
StartCoroutine(unmannedAerialVehicleManage.MoveObjectAlongPath(_positions,isMove)); // 启动协程,按规划的路线移动物体 StartCoroutine(unmannedAerialVehicleManage.MoveObjectAlongPath(_positions,true)); // 启动协程,按规划的路线移动物体
} }
} }