This commit is contained in:
yulong 2024-03-07 10:36:51 +08:00
parent 4d6d6bc203
commit 49161677ae
2 changed files with 35 additions and 30 deletions

View File

@ -382,7 +382,7 @@ public class RadarManger : MonoBehaviour
{ {
colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体 colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
var colliders2 = colliders.FindAll(x => x.tag == "WRJ"); var colliders2 = colliders.FindAll(x => x.tag == "WRJ");
minCamera.orthographicSize = detectionRadius;
if (colliders2.Count > 0) if (colliders2.Count > 0)
{ {
for (int i = 0; i < colliders2.Count; i++) for (int i = 0; i < colliders2.Count; i++)

View File

@ -183,6 +183,10 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
/// 地面层数 /// 地面层数
/// </summary> /// </summary>
public LayerMask Ground; public LayerMask Ground;
/// <summary>
/// 改变频谱探测地图上显示点的大小
/// </summary>
public bool boisp = true;
void Start() void Start()
{ {
gamePos.gameObject.SetActive(false); gamePos.gameObject.SetActive(false);
@ -215,6 +219,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
if (reveal > 1) if (reveal > 1)
{ {
gamePos.transform.localScale = new Vector3(reveal, 1, reveal); gamePos.transform.localScale = new Vector3(reveal, 1, reveal);
boisp = false;
} }
} }
@ -350,38 +355,38 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
})); }));
} }
if (Spectrumdetection.Radius > 0) if (Spectrumdetection.Radius > 0 && boisp)
{ {
if (gxWRJCamera && dzWRJCamera) //if (gxWRJCamera && dzWRJCamera)
//{
// //gxWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000;
switch (Spectrumdetection.Radius)
{ {
//gxWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000; case 1:
reveal = 30;
switch (Spectrumdetection.Radius) Mapdisplay();
{ break;
case 1: case 2:
reveal = 30; reveal = 60;
Mapdisplay(); Mapdisplay();
break; break;
case 2: case 3:
reveal = 60; reveal = 90;
Mapdisplay(); Mapdisplay();
break; break;
case 3: case 4:
reveal = 90; reveal = 120;
Mapdisplay(); Mapdisplay();
break; break;
case 4: case 5:
reveal = 120; reveal = 150;
Mapdisplay(); Mapdisplay();
break; break;
case 5: default:
reveal = 150; break;
Mapdisplay();
break;
default:
break;
}
} }
//}
} }
//Judgingdistance(); //Judgingdistance();
} }