This commit is contained in:
yulong 2024-03-27 10:51:13 +08:00
parent 150eda2bd7
commit 346a5999ac
4 changed files with 14 additions and 8 deletions

View File

@ -1633,7 +1633,8 @@ MonoBehaviour:
targets: []
radarCenter: {fileID: 0}
radarBackground: {fileID: 0}
targetPointPrefab: {fileID: 0}
targetPointPrefab: {fileID: 748507237023375508, guid: 255976aaa04a95c4fb382c39e411b935,
type: 3}
radarBaseMap: {fileID: 0}
currentCollider: {fileID: 0}
layerMask:

View File

@ -947,7 +947,7 @@ MonoBehaviour:
radarCenter: {fileID: 0}
targets: []
radarBackground: {fileID: 0}
targetPointPrefab: {fileID: 748507237023375508, guid: 255976aaa04a95c4fb382c39e411b935,
targetPointPrefab: {fileID: 206342759773512327, guid: 91611532a57ff5640a422ee5073cdc5f,
type: 3}
colliders: []
attackColliders1: []

View File

@ -500,14 +500,19 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
/// <returns></returns>
public bool GetQualifiedEquipment(Collider obj)
{
if (obj.gameObject.tag == "AttackTarget"
if (obj!=null)
{
if (obj.gameObject.tag == "AttackTarget"
&& !obj.isTrigger
&& !attackColliders1.Contains(obj)
&& obj.transform.GetComponent<HighPriorityTarget>()
&& obj.transform.GetComponent<HighPriorityTarget>().frequency.Contains(electronicReconnaissanceCapability))
return true;
else
return false;
return true;
else
return false;
}
return false;
}
/// <summary>
/// 在UI图上显示雷达点
@ -541,7 +546,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
{
List<Collider> allColliders = Physics.OverlapSphere(transform.position, Spectrumdetection.Radius * 1000).ToList(); // 检索范围内的所有碰撞体
targets = allColliders.FindAll(GetQualifiedEquipment);
ShowRadarPoint();
for (int i = 0; i < targets.Count; i++)
{
attackColliders1.Add(targets[i]);

View File

@ -95,7 +95,7 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
// 创建 RenderTexture
RenderTexture renderTexture = new RenderTexture(500, 500, 0);
renderTexture.name = unmannedAerialVehicleManage.equipmentCommon.deviceID;
unmannedAerialVehicleManage.dzWRJCamera.targetTexture = renderTexture;
unmannedAerialVehicleManage.gxWRJCamera.targetTexture = renderTexture;
if (unmannedAerialVehicleManage.wrjModel == WRJModel.)