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(); // 检索范围内的所有碰撞体
var colliders2 = colliders.FindAll(x => x.tag == "WRJ");
minCamera.orthographicSize = detectionRadius;
if (colliders2.Count > 0)
{
for (int i = 0; i < colliders2.Count; i++)

View File

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