Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
77de3a1607
|
@ -1626,8 +1626,6 @@ MonoBehaviour:
|
|||
SurveillanceFrequencyBand: {fileID: 8129871292636694301}
|
||||
flySpeedPlane: {fileID: 9020723963205404446}
|
||||
flySpeedSlider: {fileID: 608716198515631330}
|
||||
gamePos: {fileID: 3441049289142467652}
|
||||
gamemap: {fileID: 9017854076308260405}
|
||||
reveal: 0
|
||||
Ground:
|
||||
serializedVersion: 2
|
||||
|
@ -2798,14 +2796,13 @@ PrefabInstance:
|
|||
propertyPath: m_Layer
|
||||
value: 15
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 91b685a7f0a6f7643b8ae61842f883de, type: 3}
|
||||
--- !u!1 &9017854076308260405 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 638589549675547561}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &5172610439169658982 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||
|
@ -3067,6 +3064,11 @@ PrefabInstance:
|
|||
propertyPath: m_Layer
|
||||
value: 16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 91b685a7f0a6f7643b8ae61842f883de, type: 3}
|
||||
--- !u!4 &1525602421726030359 stripped
|
||||
|
@ -3075,12 +3077,6 @@ Transform:
|
|||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6501072882878902744}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &3441049289142467652 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6501072882878902744}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &6738463286047272674
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -3542,9 +3538,9 @@ PrefabInstance:
|
|||
- {fileID: 5839716182141322363, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
|
||||
- {fileID: 2022963561981901188, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
|
||||
--- !u!114 &1189649587738053663 stripped
|
||||
--- !u!114 &7739009189435305960 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5548909004573041405, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
m_CorrespondingSourceObject: {fileID: 3955760755921223946, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6738463286047272674}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -3566,9 +3562,9 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &805817557573538235 stripped
|
||||
--- !u!114 &6599785080451423720 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 6245650889842523993, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
m_CorrespondingSourceObject: {fileID: 438240288241169162, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6738463286047272674}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -3596,9 +3592,9 @@ GameObject:
|
|||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6738463286047272674}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &6599785080451423720 stripped
|
||||
--- !u!114 &1189649587738053663 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 438240288241169162, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
m_CorrespondingSourceObject: {fileID: 5548909004573041405, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6738463286047272674}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -3632,9 +3628,9 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &7739009189435305960 stripped
|
||||
--- !u!114 &805817557573538235 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 3955760755921223946, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
m_CorrespondingSourceObject: {fileID: 6245650889842523993, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6738463286047272674}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -4100,6 +4096,18 @@ PrefabInstance:
|
|||
- {fileID: 5839716182141322363, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
|
||||
- {fileID: 2022963561981901188, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
|
||||
--- !u!114 &3114167497287670592 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5548909004573041405, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 7365093489755617725}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &8959769708417747035 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 1900922108148937190, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
|
@ -4190,15 +4198,3 @@ GameObject:
|
|||
type: 3}
|
||||
m_PrefabInstance: {fileID: 7365093489755617725}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &3114167497287670592 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5548909004573041405, guid: 38fb1def99b2cd147a96842efe5a355b,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 7365093489755617725}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
|
|
|
@ -165,7 +165,7 @@ public class RadarManger : MonoBehaviour
|
|||
if (isStartRehearsing)
|
||||
{
|
||||
minCamera.gameObject.SetActive(true);
|
||||
targets = GameObject.FindGameObjectsWithTag("WRJ").ToList().FindAll(a => a.GetComponent<UnmannedAerialVehicleManage>().GetRCS() > rcs);
|
||||
targets = GameObject.FindGameObjectsWithTag("WRJ").ToList().FindAll(GetQualifiedEquipment);
|
||||
|
||||
foreach (Transform child in rawImage.transform)
|
||||
{
|
||||
|
@ -187,30 +187,14 @@ public class RadarManger : MonoBehaviour
|
|||
// onlyOne = false;
|
||||
// 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)
|
||||
{
|
||||
unmannedAerialVehicleManage.gamemap.transform.localScale = new Vector3(Mapsize, 1, Mapsize);
|
||||
//Debug.Log("改变了无人机显示大小");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 启动暂停
|
||||
|
@ -270,13 +254,6 @@ public class RadarManger : MonoBehaviour
|
|||
}
|
||||
#endregion
|
||||
|
||||
void CreateRadarUI()
|
||||
{
|
||||
imageprs.transform.localScale = Vector3.zero;
|
||||
aniRandarUI = imageprs.GetComponent<Animator>();
|
||||
RadarRotationSpeed(TurntableSpeed);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据写入
|
||||
/// </summary>
|
||||
|
@ -289,11 +266,11 @@ public class RadarManger : MonoBehaviour
|
|||
{
|
||||
case "转台转速:":
|
||||
TurntableSpeed = weaponitemone[i].para_value;
|
||||
//RadarRotationSpeed(TurntableSpeed);
|
||||
RadarRotationSpeed(TurntableSpeed);
|
||||
break;
|
||||
case "探测距离:":
|
||||
DetectionRange = weaponitemone[i].para_value;
|
||||
Showmap(float.Parse(DetectionRange));
|
||||
//Showmap(float.Parse(DetectionRange));
|
||||
detectionRadius = float.Parse(DetectionRange) * 1000;
|
||||
minCamera.orthographicSize = detectionRadius;
|
||||
break;
|
||||
|
@ -330,29 +307,7 @@ public class RadarManger : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
private void Showmap(float size)
|
||||
{
|
||||
switch (size)
|
||||
{
|
||||
case 1:
|
||||
Mapsize = 30;
|
||||
break;
|
||||
case 2:
|
||||
Mapsize = 60;
|
||||
break;
|
||||
case 3:
|
||||
Mapsize = 90;
|
||||
break;
|
||||
case 4:
|
||||
Mapsize = 120;
|
||||
break;
|
||||
case 5:
|
||||
Mapsize = 150;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 雷达转动速度
|
||||
|
@ -371,28 +326,21 @@ public class RadarManger : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
public List<Collider> colliders = new List<Collider>();
|
||||
|
||||
public List<Collider> attackColliders1 = new List<Collider>();
|
||||
/// <summary>
|
||||
/// 检索
|
||||
/// </summary>
|
||||
public void RetrievalUAV()
|
||||
{
|
||||
colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
||||
var colliders2 = colliders.FindAll(x => x.tag == "WRJ");
|
||||
|
||||
if (colliders2.Count > 0)
|
||||
if (targets.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < colliders2.Count; i++)
|
||||
for (int i = 0; i < targets.Count; i++)
|
||||
{
|
||||
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
||||
UnmannedAerialVehicle unmannedAerialVehicle = targets[i].GetComponent<UnmannedAerialVehicle>();
|
||||
if (unmannedAerialVehicle)
|
||||
{
|
||||
bool isnearBlindArea = Vector3.Distance(transform.position, unmannedAerialVehicle.transform.position) > nearBlindArea;
|
||||
if (!isnearBlindArea)
|
||||
continue;
|
||||
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)
|
||||
|
@ -412,28 +360,132 @@ public class RadarManger : MonoBehaviour
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 备份
|
||||
// public List<Collider> colliders = new List<Collider>();
|
||||
// public List<Collider> attackColliders1 = new List<Collider>();
|
||||
//public void RetrievalUAV()
|
||||
//{
|
||||
// colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
||||
// var colliders2 = colliders.FindAll(x => x.tag == "WRJ");
|
||||
|
||||
// if (colliders2.Count > 0)
|
||||
// {
|
||||
// for (int i = 0; i < colliders2.Count; i++)
|
||||
// {
|
||||
// UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
||||
// if (unmannedAerialVehicle)
|
||||
// {
|
||||
// bool isnearBlindArea = Vector3.Distance(transform.position, unmannedAerialVehicle.transform.position) > nearBlindArea;
|
||||
// if (!isnearBlindArea)
|
||||
// continue;
|
||||
// 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 + 1.5f;
|
||||
// laserFireControlPlatformManger.isLasing = true;
|
||||
// laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
||||
// laserFireControlPlatformManger.Lasing();
|
||||
// }
|
||||
// else if (microwaveweapon)
|
||||
// {
|
||||
// microwaveweapon.ismicow = true;
|
||||
// microwaveweapon.miceopos = unmannedAerialVehicle.transform;
|
||||
// microwaveweapon.Orientation();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//private void Showmap(float size)
|
||||
//{
|
||||
// switch (size)
|
||||
// {
|
||||
// case 1:
|
||||
// Mapsize = 30;
|
||||
// break;
|
||||
// case 2:
|
||||
// Mapsize = 60;
|
||||
// break;
|
||||
// case 3:
|
||||
// Mapsize = 90;
|
||||
// break;
|
||||
// case 4:
|
||||
// Mapsize = 120;
|
||||
// break;
|
||||
// case 5:
|
||||
// Mapsize = 150;
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
|
||||
//void CreateRadarUI()
|
||||
//{
|
||||
// imageprs.transform.localScale = Vector3.zero;
|
||||
// aniRandarUI = imageprs.GetComponent<Animator>();
|
||||
// RadarRotationSpeed(TurntableSpeed);
|
||||
//}
|
||||
|
||||
//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)
|
||||
// {
|
||||
// unmannedAerialVehicleManage.gamemap.transform.localScale = new Vector3(Mapsize, 1, Mapsize);
|
||||
// //Debug.Log("改变了无人机显示大小");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 雷达盲区让目标消失在地图上
|
||||
/// </summary>
|
||||
private void Deadzone()
|
||||
//private void Deadzone()
|
||||
//{
|
||||
// if (float.Parse(NearBlindArea) > 0)
|
||||
// {
|
||||
// Collider[] colliders = Physics.OverlapSphere(transform.position, float.Parse(NearBlindArea));
|
||||
// for (int i = 0; i < colliders.Length; i++)
|
||||
// {
|
||||
// if (colliders[i].transform.gameObject.tag == "WRJ")
|
||||
// {
|
||||
// //Debug.Log("进来了" + Vector3.Distance(transform.position, colliders[i].transform.position));
|
||||
// UnmannedAerialVehicleManage unmannedAerialVehicle = colliders[i].GetComponent<UnmannedAerialVehicleManage>();
|
||||
// if (unmannedAerialVehicle)
|
||||
// {
|
||||
// unmannedAerialVehicle.gamemap.SetActive(false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 获取符合条件的设备
|
||||
/// </summary>
|
||||
public bool GetQualifiedEquipment(GameObject obj)
|
||||
{
|
||||
if (float.Parse(NearBlindArea) > 0)
|
||||
{
|
||||
Collider[] colliders = Physics.OverlapSphere(transform.position, float.Parse(NearBlindArea));
|
||||
for (int i = 0; i < colliders.Length; i++)
|
||||
{
|
||||
if (colliders[i].transform.gameObject.tag == "WRJ")
|
||||
{
|
||||
//Debug.Log("进来了" + Vector3.Distance(transform.position, colliders[i].transform.position));
|
||||
UnmannedAerialVehicleManage unmannedAerialVehicle = colliders[i].GetComponent<UnmannedAerialVehicleManage>();
|
||||
if (unmannedAerialVehicle)
|
||||
{
|
||||
unmannedAerialVehicle.gamemap.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(obj.GetComponent<UnmannedAerialVehicleManage>()
|
||||
&& obj.GetComponent<UnmannedAerialVehicleManage>().GetRCS() > rcs
|
||||
&& Vector3.Distance(transform.position,obj.transform.position)> float.Parse(NearBlindArea))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检测鼠标点击的方法
|
||||
|
|
|
@ -184,14 +184,14 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
/// </summary>
|
||||
public ExtendedSlider flySpeedSlider;
|
||||
|
||||
/// <summary>
|
||||
/// 显示频谱地图上的位置
|
||||
/// </summary>
|
||||
public GameObject gamePos;
|
||||
/// <summary>
|
||||
/// 显示在雷达上的位置
|
||||
/// </summary>
|
||||
public GameObject gamemap;
|
||||
///// <summary>
|
||||
///// 显示频谱地图上的位置
|
||||
///// </summary>
|
||||
//public GameObject gamePos;
|
||||
///// <summary>
|
||||
///// 显示在雷达上的位置
|
||||
///// </summary>
|
||||
//public GameObject gamemap;
|
||||
/// <summary>
|
||||
/// 频谱显示无人机大小
|
||||
/// </summary>
|
||||
|
@ -206,7 +206,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
public bool boisp = true;
|
||||
void Start()
|
||||
{
|
||||
gamePos.gameObject.SetActive(false);
|
||||
//gamePos.gameObject.SetActive(false);
|
||||
MatrixFormation(30, 1);
|
||||
for (int i = 0; i < unmannedAerialVehicles.Count; i++)
|
||||
{
|
||||
|
@ -231,14 +231,14 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
flySpeedSlider.DragStop.AddListener(ChanagerFlySpeed);
|
||||
}
|
||||
|
||||
private void Mapdisplay()
|
||||
{
|
||||
if (reveal > 1)
|
||||
{
|
||||
gamePos.transform.localScale = new Vector3(reveal, 1, reveal);
|
||||
boisp = false;
|
||||
}
|
||||
}
|
||||
//private void Mapdisplay()
|
||||
//{
|
||||
// if (reveal > 1)
|
||||
// {
|
||||
// gamePos.transform.localScale = new Vector3(reveal, 1, reveal);
|
||||
// boisp = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 设置组得标志
|
||||
|
@ -277,7 +277,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
{
|
||||
dataLinkCommunicationFrequency = change.transform.name;
|
||||
int layerValue = LayerMask.NameToLayer(dataLinkCommunicationFrequency);
|
||||
gamePos.layer = layerValue;
|
||||
//gamePos.layer = layerValue;
|
||||
string nowData = GetSyncDataTwo();
|
||||
MyNetMQClient.instance.Send(nowData);
|
||||
equipmentCommon.SetDatabaseInfo("my_rate", dataLinkCommunicationFrequency);
|
||||
|
@ -325,7 +325,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
{
|
||||
int layerValue = LayerMask.NameToLayer(_frequency);
|
||||
dataLinkCommunicationFrequency = _frequency;
|
||||
gamePos.layer = layerValue;
|
||||
//gamePos.layer = layerValue;
|
||||
}
|
||||
/// <summary>
|
||||
/// 接受同步消息
|
||||
|
@ -348,10 +348,10 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
{
|
||||
Rotation_Angle.transform.Rotate(Vector3.up*10*Time.deltaTime);
|
||||
}
|
||||
if (isStartRehearsing)
|
||||
{
|
||||
gamePos.gameObject.SetActive(true);
|
||||
}
|
||||
//if (isStartRehearsing)
|
||||
//{
|
||||
// //gamePos.gameObject.SetActive(true);
|
||||
//}
|
||||
if (isStartRehearsing && equipmentCommon.isPlayer)
|
||||
{
|
||||
switch (pattern)
|
||||
|
@ -395,23 +395,23 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
{
|
||||
case 1:
|
||||
reveal = 30;
|
||||
Mapdisplay();
|
||||
//Mapdisplay();
|
||||
break;
|
||||
case 2:
|
||||
reveal = 60;
|
||||
Mapdisplay();
|
||||
//Mapdisplay();
|
||||
break;
|
||||
case 3:
|
||||
reveal = 90;
|
||||
Mapdisplay();
|
||||
//Mapdisplay();
|
||||
break;
|
||||
case 4:
|
||||
reveal = 120;
|
||||
Mapdisplay();
|
||||
//Mapdisplay();
|
||||
break;
|
||||
case 5:
|
||||
reveal = 150;
|
||||
Mapdisplay();
|
||||
//Mapdisplay();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -509,6 +509,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
&& allColliders[i].transform.GetComponent<HighPriorityTarget>()
|
||||
&& allColliders[i].transform.GetComponent<HighPriorityTarget>().frequency == electronicReconnaissanceCapability)
|
||||
{
|
||||
|
||||
attackColliders1.Add(allColliders[i]);
|
||||
}
|
||||
|
||||
|
@ -698,8 +699,8 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
togFrequencyBands[k].gameObject.SetActive(date1.Contains(togFrequencyBands[k].transform.name));
|
||||
}
|
||||
dataLinkCommunicationFrequency = dates1[0];
|
||||
int layerValue = LayerMask.NameToLayer(dataLinkCommunicationFrequency);
|
||||
gamePos.layer = layerValue;
|
||||
//int layerValue = LayerMask.NameToLayer(dataLinkCommunicationFrequency);
|
||||
//gamePos.layer = layerValue;
|
||||
foreach (Toggle toggle in togFrequencyBands)
|
||||
{
|
||||
if (toggle.transform.name == dataLinkCommunicationFrequency)
|
||||
|
@ -826,38 +827,38 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
/// <summary>
|
||||
/// 雷达检测无人机身上得RSC
|
||||
/// </summary>
|
||||
public void CheckRSC()
|
||||
{
|
||||
if (string.IsNullOrEmpty(RCS))
|
||||
{
|
||||
float rcs = float.Parse(RCS);
|
||||
if (rcs <= 0.5 && rcs >= 0.1)
|
||||
{
|
||||
StartCoroutine(ShowRadarTips(0.8f, 2));
|
||||
}
|
||||
else if (rcs >= 0.5f && rcs <= 1)
|
||||
{
|
||||
StartCoroutine(ShowRadarTips(0.4f, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
//public void CheckRSC()
|
||||
//{
|
||||
// if (string.IsNullOrEmpty(RCS))
|
||||
// {
|
||||
// float rcs = float.Parse(RCS);
|
||||
// if (rcs <= 0.5 && rcs >= 0.1)
|
||||
// {
|
||||
// StartCoroutine(ShowRadarTips(0.8f, 2));
|
||||
// }
|
||||
// else if (rcs >= 0.5f && rcs <= 1)
|
||||
// {
|
||||
// StartCoroutine(ShowRadarTips(0.4f, 1));
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
/// <summary>
|
||||
/// 多少时间在对方雷达界面上显示红色标记
|
||||
/// </summary>
|
||||
/// <param name="minTime"></param>
|
||||
/// <param name="maxTime"></param>
|
||||
/// <returns></returns>
|
||||
private IEnumerator ShowRadarTips(float minTime, float maxTime)
|
||||
{
|
||||
GameObject tips = transform.Find("Minimapwrj").gameObject;
|
||||
while (true)
|
||||
{
|
||||
tips.gameObject.SetActive(false);
|
||||
float time = UnityEngine.Random.Range(minTime, maxTime);
|
||||
yield return new WaitForSeconds(time);
|
||||
tips.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
//private IEnumerator ShowRadarTips(float minTime, float maxTime)
|
||||
//{
|
||||
// GameObject tips = transform.Find("Minimapwrj").gameObject;
|
||||
// while (true)
|
||||
// {
|
||||
// tips.gameObject.SetActive(false);
|
||||
// float time = UnityEngine.Random.Range(minTime, maxTime);
|
||||
// yield return new WaitForSeconds(time);
|
||||
// tips.gameObject.SetActive(true);
|
||||
// }
|
||||
//}
|
||||
|
||||
public LayerMask layerMask = new LayerMask();
|
||||
/// <summary>
|
||||
|
@ -1162,7 +1163,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
if (isMove && positions.Count > 0)
|
||||
{
|
||||
isMove = false;
|
||||
gamePos.gameObject.SetActive(true);
|
||||
//gamePos.gameObject.SetActive(true);
|
||||
//gamemap.gameObject.SetActive(true);
|
||||
Vector3 _positions = positions.Dequeue();
|
||||
var nowData = GetSyncData(_positions);
|
||||
|
@ -1180,7 +1181,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
/// <returns></returns>
|
||||
public IEnumerator MoveObjectAlongPath(Vector3 _positions) // 协程:按路线移动物体
|
||||
{
|
||||
gamePos.gameObject.SetActive(true);
|
||||
//gamePos.gameObject.SetActive(true);
|
||||
//gamemap.gameObject.SetActive(true);
|
||||
Vector3 targetPosition = new Vector3(_positions.x, hight, _positions.z);// 目标位置为当前顶点坐标
|
||||
float _distance = Vector3.Distance(transform.position, targetPosition);
|
||||
|
@ -1230,7 +1231,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
unmannedAerialVehicleManages.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
StopCoroutine(ShowRadarTips(0, 0));
|
||||
//StopCoroutine(ShowRadarTips(0, 0));
|
||||
OnActivationChanged -= OnActivationChangedHandler;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue