This commit is contained in:
账号名 2024-03-07 11:14:47 +08:00
commit 555b4c30b3
3 changed files with 57 additions and 52 deletions

View File

@ -75,7 +75,7 @@ public class HighPriorityTarget : MonoBehaviour
public GameObject gamepos;
void Start()
{
gamepos.gameObject.SetActive(false);
//gamepos.gameObject.SetActive(false);
HighPriorityTargets.Add(this);
Number = HighPriorityTargets.Count.ToString();
buttonreg.onClick.AddListener(() =>
@ -143,28 +143,28 @@ public class HighPriorityTarget : MonoBehaviour
}
}
}
if (Spectrumdetection.Radius > 0)
{
if (gamepos)
{
gamepos.gameObject.SetActive(true);
switch (Spectrumdetection.Radius)
{
case 1:
gamepos.transform.localScale = new Vector3(10, 1, 10);
break;
case 2:
gamepos.transform.localScale = new Vector3(20, 1, 20);
break;
case 3:
gamepos.transform.localScale = new Vector3(30, 1, 30);
break;
default:
break;
}
}
//if (Spectrumdetection.Radius > 0)
//{
// if (gamepos)
// {
// gamepos.gameObject.SetActive(true);
// switch (Spectrumdetection.Radius)
// {
// case 1:
// gamepos.transform.localScale = new Vector3(10, 1, 10);
// break;
// case 2:
// gamepos.transform.localScale = new Vector3(20, 1, 20);
// break;
// case 3:
// gamepos.transform.localScale = new Vector3(30, 1, 30);
// break;
// default:
// break;
// }
// }
}
//}
}
/// <summary>

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();
}