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

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