This commit is contained in:
parent
be6067fdac
commit
9c17e11cf8
|
@ -357,15 +357,9 @@ public class Spectrumdetection : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击物体生成页面
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void Emittedray()
|
||||
{
|
||||
|
||||
}
|
||||
public Collider[] colliders;
|
||||
|
||||
public List<Collider> attackColliders1 = new List<Collider>();
|
||||
/// <summary>
|
||||
/// 搜索范围内的无人机
|
||||
/// </summary>
|
||||
|
@ -380,16 +374,26 @@ public class Spectrumdetection : MonoBehaviour
|
|||
UnmannedAerialVehicle unmannedAerialVehicle = null;
|
||||
if (colliders[i].GetComponent<UnmannedAerialVehicle>())
|
||||
{
|
||||
attackColliders1.Add(colliders[i]);
|
||||
unmannedAerialVehicle = colliders[i].GetComponent<UnmannedAerialVehicle>();
|
||||
if (unmannedAerialVehicle != null&& unmannedAerialVehicle.unmannedAerialVehicleManage.dataLinkCommunicationFrequency== Frequency)
|
||||
{
|
||||
Microwaveweapon microwaveweapon = Microwaveweapon.MicrowaveweaponList.Find(x => (x != null && x.ismicow == false));
|
||||
|
||||
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false && x.lasertime <= 0));
|
||||
if (microwaveweapon)
|
||||
{
|
||||
microwaveweapon.ismicow = true;
|
||||
microwaveweapon.miceopos = unmannedAerialVehicle.transform;
|
||||
microwaveweapon.Orientation();
|
||||
}
|
||||
else if (laserFireControlPlatformManger)
|
||||
{
|
||||
laserFireControlPlatformManger.lasertime = laserFireControlPlatformManger.storageIntervalTime;
|
||||
laserFireControlPlatformManger.isLasing = true;
|
||||
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
||||
laserFireControlPlatformManger.Lasing();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -290,12 +290,15 @@ public class RadarManger : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
public List<Collider> colliders = new List<Collider>();
|
||||
|
||||
public List<Collider> attackColliders1 = new List<Collider>();
|
||||
/// <summary>
|
||||
/// 检索
|
||||
/// </summary>
|
||||
public void RetrievalUAV()
|
||||
{
|
||||
List<Collider> colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
||||
colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
||||
var colliders2 = colliders.FindAll(x => x.tag == "WRJ");
|
||||
minCamera.orthographicSize = detectionRadius;
|
||||
if (colliders2.Count > 0)
|
||||
|
@ -305,7 +308,9 @@ public class RadarManger : MonoBehaviour
|
|||
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
||||
if (unmannedAerialVehicle)
|
||||
{
|
||||
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false && x.lasertime <= 0));
|
||||
attackColliders1.Add(colliders[i]);
|
||||
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false && x.lasertime <= 0));
|
||||
Microwaveweapon microwaveweapon = Microwaveweapon.MicrowaveweaponList.Find(x => (x != null && x.ismicow == false));
|
||||
if (laserFireControlPlatformManger)
|
||||
{
|
||||
laserFireControlPlatformManger.lasertime = laserFireControlPlatformManger.storageIntervalTime;
|
||||
|
@ -313,6 +318,12 @@ public class RadarManger : MonoBehaviour
|
|||
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
||||
laserFireControlPlatformManger.Lasing();
|
||||
}
|
||||
else if (microwaveweapon)
|
||||
{
|
||||
microwaveweapon.ismicow = true;
|
||||
microwaveweapon.miceopos = unmannedAerialVehicle.transform;
|
||||
microwaveweapon.Orientation();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
|
|||
public void DistroyUI(string deviceID)
|
||||
{
|
||||
if(deviceID.Length < 10) return;
|
||||
RadioAngleView radioAngleView = radioAngleViews.Find(x => x.deviceID == deviceID);
|
||||
RadioAngleView radioAngleView = radioAngleViews.Find(x => x != null && x.deviceID == deviceID);
|
||||
if (radioAngleView)
|
||||
{
|
||||
Destroy(radioAngleView.gameObject);
|
||||
|
@ -155,9 +155,10 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
|
|||
}
|
||||
}
|
||||
}
|
||||
RenderTexture renderTexture = renderTextures.Find(x => x.name.Contains(deviceID));
|
||||
RenderTexture renderTexture = renderTextures.Find(x => x != null && x.name.Contains(deviceID));
|
||||
if (renderTexture)
|
||||
{
|
||||
Debug.Log("删除了" + renderTexture.name);
|
||||
Destroy(renderTexture);
|
||||
for (int i = 0; i < renderTextures.Count; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue