Merge branch 'master' of http://172.16.1.12/yulong/NewN_UAVPlane
This commit is contained in:
commit
71d0c94fd9
|
@ -22253,6 +22253,11 @@ PrefabInstance:
|
||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
value: 12
|
value: 12
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1211343198027249645, guid: 1f803842203167d4aa8e14297954d6f2,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1565820973654412168, guid: 1f803842203167d4aa8e14297954d6f2,
|
- target: {fileID: 1565820973654412168, guid: 1f803842203167d4aa8e14297954d6f2,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
|
|
|
@ -724,6 +724,8 @@ MonoBehaviour:
|
||||||
pattern: 0
|
pattern: 0
|
||||||
interval: 5
|
interval: 5
|
||||||
equipmentCommon: {fileID: -7238547075891962512}
|
equipmentCommon: {fileID: -7238547075891962512}
|
||||||
|
groupId: -1
|
||||||
|
isGroup: 0
|
||||||
UAVPrefab: {fileID: 7985558213978141209, guid: 088baeb890d17754287a1161c0b1dceb,
|
UAVPrefab: {fileID: 7985558213978141209, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
type: 3}
|
type: 3}
|
||||||
totalObjects: 1
|
totalObjects: 1
|
||||||
|
@ -1041,7 +1043,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalScale.x
|
propertyPath: m_LocalScale.x
|
||||||
value: 30
|
value: 120
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
@ -1051,7 +1053,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalScale.z
|
propertyPath: m_LocalScale.z
|
||||||
value: 30
|
value: 120
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
@ -2668,7 +2670,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalScale.x
|
propertyPath: m_LocalScale.x
|
||||||
value: 30
|
value: 120
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
@ -2678,7 +2680,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalScale.z
|
propertyPath: m_LocalScale.z
|
||||||
value: 30
|
value: 120
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
|
@ -735,7 +735,7 @@ MonoBehaviour:
|
||||||
toggle6: {fileID: 6251437642903478223}
|
toggle6: {fileID: 6251437642903478223}
|
||||||
toggle7: {fileID: 117463751223528660}
|
toggle7: {fileID: 117463751223528660}
|
||||||
Frequency:
|
Frequency:
|
||||||
camera: {fileID: 480111845}
|
Camera1: {fileID: 480111845}
|
||||||
rawImage: {fileID: 1115657768}
|
rawImage: {fileID: 1115657768}
|
||||||
colliders: []
|
colliders: []
|
||||||
attackColliders1: []
|
attackColliders1: []
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 摄像机显示层数
|
/// 摄像机显示层数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Camera camera;
|
public Camera Camera1;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -99,8 +99,13 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool onlyOne = true;
|
private bool onlyOne = true;
|
||||||
|
/// <summary>
|
||||||
|
/// 接收探测范围
|
||||||
|
/// </summary>
|
||||||
|
public static float Radius;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
Camera1.gameObject.SetActive(false);
|
||||||
spectrumdetections.Add(this);
|
spectrumdetections.Add(this);
|
||||||
|
|
||||||
equipmentCommon = GetComponent<EquipmentCommon>();
|
equipmentCommon = GetComponent<EquipmentCommon>();
|
||||||
|
@ -113,13 +118,16 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
//if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
||||||
{
|
//{
|
||||||
onlyOne = false;
|
// onlyOne = false;
|
||||||
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, rawImage);
|
// DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, rawImage);
|
||||||
}
|
//}
|
||||||
if (isStartRehearsing)
|
if (isStartRehearsing)
|
||||||
|
{
|
||||||
|
Camera1.gameObject.SetActive(true);
|
||||||
Search();//微波武器朝向无人机
|
Search();//微波武器朝向无人机
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void Microwave()
|
private void Microwave()
|
||||||
{
|
{
|
||||||
|
@ -132,7 +140,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
if (ison)
|
if (ison)
|
||||||
{
|
{
|
||||||
Frequency = "UHF";
|
Frequency = "UHF";
|
||||||
camera.cullingMask = 1 << 16;
|
Camera1.cullingMask = 1 << 16;
|
||||||
SweepFrequencyBandTo();
|
SweepFrequencyBandTo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -141,7 +149,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
if (ison)
|
if (ison)
|
||||||
{
|
{
|
||||||
Frequency = "L";
|
Frequency = "L";
|
||||||
camera.cullingMask = 1 << 17;
|
Camera1.cullingMask = 1 << 17;
|
||||||
SweepFrequencyBandTo();
|
SweepFrequencyBandTo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -150,7 +158,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
if (ison)
|
if (ison)
|
||||||
{
|
{
|
||||||
Frequency = "S";
|
Frequency = "S";
|
||||||
camera.cullingMask = 1 << 18;
|
Camera1.cullingMask = 1 << 18;
|
||||||
SweepFrequencyBandTo();
|
SweepFrequencyBandTo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -159,7 +167,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
if (ison)
|
if (ison)
|
||||||
{
|
{
|
||||||
Frequency = "C";
|
Frequency = "C";
|
||||||
camera.cullingMask = 1 << 19;
|
Camera1.cullingMask = 1 << 19;
|
||||||
SweepFrequencyBandTo();
|
SweepFrequencyBandTo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -168,7 +176,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
if (ison)
|
if (ison)
|
||||||
{
|
{
|
||||||
Frequency = "X";
|
Frequency = "X";
|
||||||
camera.cullingMask = 1 << 20;
|
Camera1.cullingMask = 1 << 20;
|
||||||
SweepFrequencyBandTo();
|
SweepFrequencyBandTo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -177,7 +185,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
if (ison)
|
if (ison)
|
||||||
{
|
{
|
||||||
Frequency = "Ku";
|
Frequency = "Ku";
|
||||||
camera.cullingMask = 1 << 21;
|
Camera1.cullingMask = 1 << 21;
|
||||||
SweepFrequencyBandTo();
|
SweepFrequencyBandTo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -186,7 +194,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
if (ison)
|
if (ison)
|
||||||
{
|
{
|
||||||
Frequency = "Ka";
|
Frequency = "Ka";
|
||||||
camera.cullingMask = (1 << 22);
|
Camera1.cullingMask = (1 << 22);
|
||||||
SweepFrequencyBandTo();
|
SweepFrequencyBandTo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -203,7 +211,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
{
|
{
|
||||||
int layerValue = LayerMask.NameToLayer(_frequency);
|
int layerValue = LayerMask.NameToLayer(_frequency);
|
||||||
Frequency = _frequency;
|
Frequency = _frequency;
|
||||||
camera.cullingMask = (1 << layerValue);
|
Camera1.cullingMask = (1 << layerValue);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置扫描频段同步
|
/// 设置扫描频段同步
|
||||||
|
@ -264,6 +272,8 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
{
|
{
|
||||||
case "探测距离:":
|
case "探测距离:":
|
||||||
Detectionrange = weaponitemone[i].para_value;
|
Detectionrange = weaponitemone[i].para_value;
|
||||||
|
Radius = float.Parse(Detectionrange);
|
||||||
|
Camera1.orthographicSize = Radius * 1000;
|
||||||
break;
|
break;
|
||||||
case "批目标处理能力:":
|
case "批目标处理能力:":
|
||||||
Batchcapacity = weaponitemone[i].para_value;
|
Batchcapacity = weaponitemone[i].para_value;
|
||||||
|
@ -368,7 +378,7 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
private void Search()
|
private void Search()
|
||||||
{
|
{
|
||||||
attackColliders1.Clear();
|
attackColliders1.Clear();
|
||||||
colliders = Physics.OverlapSphere(transform.position, float.Parse(Detectionrange) * 100);
|
colliders = Physics.OverlapSphere(transform.position, float.Parse(Detectionrange) * 1000);
|
||||||
for (int i = 0; i < colliders.Length; i++)
|
for (int i = 0; i < colliders.Length; i++)
|
||||||
{
|
{
|
||||||
if (colliders[i].transform.gameObject.tag == "WRJ")
|
if (colliders[i].transform.gameObject.tag == "WRJ")
|
||||||
|
|
|
@ -75,6 +75,7 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
public GameObject gamepos;
|
public GameObject gamepos;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
gamepos.gameObject.SetActive(false);
|
||||||
HighPriorityTargets.Add(this);
|
HighPriorityTargets.Add(this);
|
||||||
Number = HighPriorityTargets.Count.ToString();
|
Number = HighPriorityTargets.Count.ToString();
|
||||||
buttonreg.onClick.AddListener(() =>
|
buttonreg.onClick.AddListener(() =>
|
||||||
|
@ -141,6 +142,24 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Spectrumdetection.Radius > 0)
|
||||||
|
{
|
||||||
|
gamepos.gameObject.SetActive(true);
|
||||||
|
switch (Spectrumdetection.Radius)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
gamepos.transform.localScale = new Vector3(8, 1, 8);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
gamepos.transform.localScale = new Vector3(16, 1, 16);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
gamepos.transform.localScale = new Vector3(24, 1, 24);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -136,9 +136,14 @@ public class RadarManger : MonoBehaviour
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool onlyOne = true;
|
private bool onlyOne = true;
|
||||||
|
/// <summary>
|
||||||
|
/// 接收无人机显示在地图上的参数大小
|
||||||
|
/// </summary>
|
||||||
|
public float Mapsize;
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
|
//失活摄像机
|
||||||
|
minCamera.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
@ -152,13 +157,41 @@ public class RadarManger : MonoBehaviour
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
//老师点了开始演习就激活摄像机
|
||||||
|
if (isStartRehearsing)
|
||||||
|
{
|
||||||
|
minCamera.gameObject.SetActive(true);
|
||||||
|
}
|
||||||
if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
||||||
{
|
{
|
||||||
onlyOne = false;
|
onlyOne = false;
|
||||||
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
|
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
|
||||||
}
|
}
|
||||||
Deadzone();//雷达盲区
|
Deadzone();//雷达盲区
|
||||||
|
if (Mapsize >1)
|
||||||
|
{
|
||||||
|
Dotsize();//改变雷达地图上显示无人机大小
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Dotsize()
|
||||||
|
{
|
||||||
|
GameObject[] wrjdtdx = GameObject.FindGameObjectsWithTag("WRJ");
|
||||||
|
for (int i = 0; i < wrjdtdx.Length; i++)
|
||||||
|
{
|
||||||
|
if (wrjdtdx[i].gameObject.tag=="WRJ"&& equipmentCommon.isPlayer)
|
||||||
|
{
|
||||||
|
UnmannedAerialVehicleManage unmannedAerialVehicleManage = wrjdtdx[i].GetComponent<UnmannedAerialVehicleManage>();
|
||||||
|
if (unmannedAerialVehicleManage)
|
||||||
|
{
|
||||||
|
unmannedAerialVehicleManage.gamemap.transform.localScale = new Vector3(Mapsize,1,Mapsize);
|
||||||
|
Debug.Log("改变了无人机显示大小");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 雷达盲区让目标消失在地图上
|
/// 雷达盲区让目标消失在地图上
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -262,12 +295,13 @@ public class RadarManger : MonoBehaviour
|
||||||
break;
|
break;
|
||||||
case "探测距离:":
|
case "探测距离:":
|
||||||
DetectionRange = weaponitemone[i].para_value;
|
DetectionRange = weaponitemone[i].para_value;
|
||||||
|
Showmap(float.Parse(DetectionRange));
|
||||||
detectionRadius = float.Parse(DetectionRange) * 1000;
|
detectionRadius = float.Parse(DetectionRange) * 1000;
|
||||||
minCamera.orthographicSize = detectionRadius;
|
minCamera.orthographicSize = detectionRadius;
|
||||||
break;
|
break;
|
||||||
case "近盲区:":
|
case "近盲区:":
|
||||||
NearBlindArea = weaponitemone[i].para_value;
|
NearBlindArea = weaponitemone[i].para_value;
|
||||||
Debug.LogError(NearBlindArea);
|
//Debug.LogError(NearBlindArea);
|
||||||
nearBlindArea = float.Parse(DetectionRange);
|
nearBlindArea = float.Parse(DetectionRange);
|
||||||
break;
|
break;
|
||||||
case "批量标处理能力:":
|
case "批量标处理能力:":
|
||||||
|
@ -298,6 +332,30 @@ public class RadarManger : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Showmap(float size)
|
||||||
|
{
|
||||||
|
switch (size)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
Mapsize = 24;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Mapsize = 48;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Mapsize = 72;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
Mapsize = 96;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
Mapsize = 120;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 雷达转动速度
|
/// 雷达转动速度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -174,9 +174,14 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
/// 显示在雷达上的位置
|
/// 显示在雷达上的位置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameObject gamemap;
|
public GameObject gamemap;
|
||||||
|
/// <summary>
|
||||||
|
/// 频谱显示无人机大小
|
||||||
|
/// </summary>
|
||||||
|
public float reveal;
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
gamePos.gameObject.SetActive(false);
|
||||||
MatrixFormation(30, 1);
|
MatrixFormation(30, 1);
|
||||||
for (int i = 0; i < unmannedAerialVehicles.Count; i++)
|
for (int i = 0; i < unmannedAerialVehicles.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -198,7 +203,15 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
{
|
{
|
||||||
toggle.onValueChanged.AddListener(delegate { SurveillanceFrequencyBandsValueChanged(toggle); });
|
toggle.onValueChanged.AddListener(delegate { SurveillanceFrequencyBandsValueChanged(toggle); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Mapdisplay()
|
||||||
|
{
|
||||||
|
if (reveal>1)
|
||||||
|
{
|
||||||
|
gamePos.transform.localScale = new Vector3(reveal, 1, reveal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -265,6 +278,10 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
if (isStartRehearsing)
|
||||||
|
{
|
||||||
|
gamePos.gameObject.SetActive(true);
|
||||||
|
}
|
||||||
if (isStartRehearsing && equipmentCommon.isPlayer)
|
if (isStartRehearsing && equipmentCommon.isPlayer)
|
||||||
{
|
{
|
||||||
switch (pattern)
|
switch (pattern)
|
||||||
|
@ -300,6 +317,28 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
if (Spectrumdetection.Radius > 0)
|
||||||
|
{
|
||||||
|
gxWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000;
|
||||||
|
dzWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000;
|
||||||
|
switch (Spectrumdetection.Radius)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
reveal = 24;
|
||||||
|
Mapdisplay();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
reveal = 48;
|
||||||
|
Mapdisplay();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
reveal = 72;
|
||||||
|
Mapdisplay();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -376,9 +415,10 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
{
|
{
|
||||||
//if (isEngagedTarget) return;
|
//if (isEngagedTarget) return;
|
||||||
//if (wrjModel == WRJModel.电子侦察无人机 || wrjModel == WRJModel.光学无人机)
|
//if (wrjModel == WRJModel.电子侦察无人机 || wrjModel == WRJModel.光学无人机)
|
||||||
|
|
||||||
if (wrjModel == WRJModel.电子侦察无人机)
|
if (wrjModel == WRJModel.电子侦察无人机)
|
||||||
{
|
{
|
||||||
List<Collider> allColliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
List<Collider> allColliders = Physics.OverlapSphere(transform.position, Spectrumdetection.Radius*1000).ToList(); // 检索范围内的所有碰撞体
|
||||||
for (int i = 0; i < allColliders.Count; i++)
|
for (int i = 0; i < allColliders.Count; i++)
|
||||||
{
|
{
|
||||||
if (allColliders[i].gameObject.tag == "AttackTarget"
|
if (allColliders[i].gameObject.tag == "AttackTarget"
|
||||||
|
@ -394,7 +434,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
}
|
}
|
||||||
else if (wrjModel == WRJModel.光学无人机)
|
else if (wrjModel == WRJModel.光学无人机)
|
||||||
{
|
{
|
||||||
List<Collider> allColliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
List<Collider> allColliders = Physics.OverlapSphere(transform.position, Spectrumdetection.Radius*1000).ToList(); // 检索范围内的所有碰撞体
|
||||||
for (int i = 0; i < allColliders.Count; i++)
|
for (int i = 0; i < allColliders.Count; i++)
|
||||||
{
|
{
|
||||||
if (allColliders[i].gameObject.tag == "AttackTarget" && !allColliders[i].isTrigger && !attackColliders1.Contains(allColliders[i]))
|
if (allColliders[i].gameObject.tag == "AttackTarget" && !allColliders[i].isTrigger && !attackColliders1.Contains(allColliders[i]))
|
||||||
|
|
|
@ -42,7 +42,7 @@ PlayerSettings:
|
||||||
m_SplashScreenLogos: []
|
m_SplashScreenLogos: []
|
||||||
m_VirtualRealitySplashScreen: {fileID: 0}
|
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||||
m_HolographicTrackingLossScreen: {fileID: 0}
|
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||||
defaultScreenWidth: 960
|
defaultScreenWidth: 900
|
||||||
defaultScreenHeight: 540
|
defaultScreenHeight: 540
|
||||||
defaultScreenWidthWeb: 960
|
defaultScreenWidthWeb: 960
|
||||||
defaultScreenHeightWeb: 600
|
defaultScreenHeightWeb: 600
|
||||||
|
@ -90,7 +90,7 @@ PlayerSettings:
|
||||||
xboxEnableKinectAutoTracking: 0
|
xboxEnableKinectAutoTracking: 0
|
||||||
xboxEnableFitness: 0
|
xboxEnableFitness: 0
|
||||||
visibleInBackground: 1
|
visibleInBackground: 1
|
||||||
allowFullscreenSwitch: 1
|
allowFullscreenSwitch: 0
|
||||||
fullscreenMode: 3
|
fullscreenMode: 3
|
||||||
xboxSpeechDB: 0
|
xboxSpeechDB: 0
|
||||||
xboxEnableHeadOrientation: 0
|
xboxEnableHeadOrientation: 0
|
||||||
|
|
Loading…
Reference in New Issue