Compare commits

..

No commits in common. "8dfca84928470b1eda3a3933bb575990f9c68ad4" and "3555b0dcc0b7646de206c02ad266c9a070b1a352" have entirely different histories.

8 changed files with 26 additions and 160 deletions

View File

@ -22253,11 +22253,6 @@ 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

View File

@ -724,8 +724,6 @@ 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
@ -1043,7 +1041,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: 120 value: 30
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de, - target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
type: 3} type: 3}
@ -1053,7 +1051,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: 120 value: 30
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de, - target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
type: 3} type: 3}
@ -2670,7 +2668,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: 120 value: 30
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de, - target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
type: 3} type: 3}
@ -2680,7 +2678,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: 120 value: 30
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de, - target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
type: 3} type: 3}

View File

@ -735,7 +735,7 @@ MonoBehaviour:
toggle6: {fileID: 6251437642903478223} toggle6: {fileID: 6251437642903478223}
toggle7: {fileID: 117463751223528660} toggle7: {fileID: 117463751223528660}
Frequency: Frequency:
Camera1: {fileID: 480111845} camera: {fileID: 480111845}
rawImage: {fileID: 1115657768} rawImage: {fileID: 1115657768}
colliders: [] colliders: []
attackColliders1: [] attackColliders1: []

View File

@ -90,7 +90,7 @@ public class Spectrumdetection : MonoBehaviour
/// <summary> /// <summary>
/// 摄像机显示层数 /// 摄像机显示层数
/// </summary> /// </summary>
public Camera Camera1; public Camera camera;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -99,13 +99,8 @@ 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>();
@ -118,16 +113,13 @@ public class Spectrumdetection : MonoBehaviour
void Update() void Update()
{ {
//if (onlyOne && equipmentCommon.deviceID.Length > 10) if (onlyOne && equipmentCommon.deviceID.Length > 10)
//{
// onlyOne = false;
// DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, rawImage);
//}
if (isStartRehearsing)
{ {
Camera1.gameObject.SetActive(true); onlyOne = false;
Search();//微波武器朝向无人机 DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, rawImage);
} }
if (isStartRehearsing)
Search();//微波武器朝向无人机
} }
private void Microwave() private void Microwave()
{ {
@ -140,7 +132,7 @@ public class Spectrumdetection : MonoBehaviour
if (ison) if (ison)
{ {
Frequency = "UHF"; Frequency = "UHF";
Camera1.cullingMask = 1 << 16; camera.cullingMask = 1 << 16;
SweepFrequencyBandTo(); SweepFrequencyBandTo();
} }
}); });
@ -149,7 +141,7 @@ public class Spectrumdetection : MonoBehaviour
if (ison) if (ison)
{ {
Frequency = "L"; Frequency = "L";
Camera1.cullingMask = 1 << 17; camera.cullingMask = 1 << 17;
SweepFrequencyBandTo(); SweepFrequencyBandTo();
} }
}); });
@ -158,7 +150,7 @@ public class Spectrumdetection : MonoBehaviour
if (ison) if (ison)
{ {
Frequency = "S"; Frequency = "S";
Camera1.cullingMask = 1 << 18; camera.cullingMask = 1 << 18;
SweepFrequencyBandTo(); SweepFrequencyBandTo();
} }
}); });
@ -167,7 +159,7 @@ public class Spectrumdetection : MonoBehaviour
if (ison) if (ison)
{ {
Frequency = "C"; Frequency = "C";
Camera1.cullingMask = 1 << 19; camera.cullingMask = 1 << 19;
SweepFrequencyBandTo(); SweepFrequencyBandTo();
} }
}); });
@ -176,7 +168,7 @@ public class Spectrumdetection : MonoBehaviour
if (ison) if (ison)
{ {
Frequency = "X"; Frequency = "X";
Camera1.cullingMask = 1 << 20; camera.cullingMask = 1 << 20;
SweepFrequencyBandTo(); SweepFrequencyBandTo();
} }
}); });
@ -185,7 +177,7 @@ public class Spectrumdetection : MonoBehaviour
if (ison) if (ison)
{ {
Frequency = "Ku"; Frequency = "Ku";
Camera1.cullingMask = 1 << 21; camera.cullingMask = 1 << 21;
SweepFrequencyBandTo(); SweepFrequencyBandTo();
} }
}); });
@ -194,7 +186,7 @@ public class Spectrumdetection : MonoBehaviour
if (ison) if (ison)
{ {
Frequency = "Ka"; Frequency = "Ka";
Camera1.cullingMask = (1 << 22); camera.cullingMask = (1 << 22);
SweepFrequencyBandTo(); SweepFrequencyBandTo();
} }
}); });
@ -211,7 +203,7 @@ public class Spectrumdetection : MonoBehaviour
{ {
int layerValue = LayerMask.NameToLayer(_frequency); int layerValue = LayerMask.NameToLayer(_frequency);
Frequency = _frequency; Frequency = _frequency;
Camera1.cullingMask = (1 << layerValue); camera.cullingMask = (1 << layerValue);
} }
/// <summary> /// <summary>
/// 设置扫描频段同步 /// 设置扫描频段同步
@ -272,8 +264,6 @@ 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;
@ -378,7 +368,7 @@ public class Spectrumdetection : MonoBehaviour
private void Search() private void Search()
{ {
attackColliders1.Clear(); attackColliders1.Clear();
colliders = Physics.OverlapSphere(transform.position, float.Parse(Detectionrange) * 1000); colliders = Physics.OverlapSphere(transform.position, float.Parse(Detectionrange) * 100);
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")

View File

@ -75,7 +75,6 @@ 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(() =>
@ -142,24 +141,6 @@ 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>

View File

@ -136,14 +136,9 @@ 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()
{ {
@ -157,41 +152,13 @@ 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>
@ -295,13 +262,12 @@ 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 "批量标处理能力:":
@ -332,30 +298,6 @@ 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>

View File

@ -174,14 +174,9 @@ 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++)
{ {
@ -203,15 +198,7 @@ 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>
@ -278,10 +265,6 @@ 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)
@ -317,28 +300,6 @@ 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>
@ -415,10 +376,9 @@ 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, Spectrumdetection.Radius*1000).ToList(); // 检索范围内的所有碰撞体 List<Collider> allColliders = Physics.OverlapSphere(transform.position, detectionRadius).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"
@ -434,7 +394,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
} }
else if (wrjModel == WRJModel.) else if (wrjModel == WRJModel.)
{ {
List<Collider> allColliders = Physics.OverlapSphere(transform.position, Spectrumdetection.Radius*1000).ToList(); // 检索范围内的所有碰撞体 List<Collider> allColliders = Physics.OverlapSphere(transform.position, detectionRadius).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]))

View File

@ -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: 900 defaultScreenWidth: 960
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: 0 allowFullscreenSwitch: 1
fullscreenMode: 3 fullscreenMode: 3
xboxSpeechDB: 0 xboxSpeechDB: 0
xboxEnableHeadOrientation: 0 xboxEnableHeadOrientation: 0