This commit is contained in:
parent
42ea8a8e5a
commit
5e73da145f
|
@ -184,6 +184,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
equipmentCommon: {fileID: 0}
|
||||
deviceID:
|
||||
InterferingFrequency: 1
|
||||
InterferenceMode: 0
|
||||
TransmittedPower: 1
|
||||
|
@ -204,6 +205,14 @@ MonoBehaviour:
|
|||
toggle5: {fileID: 5568168215383948007}
|
||||
toggle6: {fileID: 5851166370117646347}
|
||||
toggle7: {fileID: 455783934966328080}
|
||||
togInterferenceBand:
|
||||
- {fileID: 6647778548576610877}
|
||||
- {fileID: 2013985248290947786}
|
||||
- {fileID: 9058785278481139943}
|
||||
- {fileID: 2161701576025044660}
|
||||
- {fileID: 5568168215383948007}
|
||||
- {fileID: 5851166370117646347}
|
||||
- {fileID: 455783934966328080}
|
||||
Waveimage: {fileID: 6753113667049944911}
|
||||
buttonoff: {fileID: 1637704249957273881}
|
||||
disturb:
|
||||
|
|
|
@ -727,13 +727,14 @@ MonoBehaviour:
|
|||
SpectrumdetectionUI: {fileID: 4504370092153585706}
|
||||
Frequencyiamge: {fileID: 6504874221885083787}
|
||||
frenbutton: {fileID: 1245349667316659933}
|
||||
toggle1: {fileID: 6607821772367089145}
|
||||
toggle2: {fileID: 2017904362660357390}
|
||||
toggle3: {fileID: 8810536813081833251}
|
||||
toggle4: {fileID: 1877435463607341424}
|
||||
toggle5: {fileID: 5382943705491709219}
|
||||
toggle6: {fileID: 6251437642903478223}
|
||||
toggle7: {fileID: 117463751223528660}
|
||||
toggles:
|
||||
- {fileID: 6607821772367089145}
|
||||
- {fileID: 2017904362660357390}
|
||||
- {fileID: 8810536813081833251}
|
||||
- {fileID: 1877435463607341424}
|
||||
- {fileID: 5382943705491709219}
|
||||
- {fileID: 6251437642903478223}
|
||||
- {fileID: 117463751223528660}
|
||||
Frequency:
|
||||
Camera1: {fileID: 480111845}
|
||||
rawImage: {fileID: 1115657768}
|
||||
|
|
|
@ -82,7 +82,11 @@ public class Spectrumdetection : MonoBehaviour
|
|||
/// <summary>
|
||||
/// 选择最终的频段
|
||||
/// </summary>
|
||||
public Toggle toggle1, toggle2, toggle3, toggle4, toggle5, toggle6, toggle7;
|
||||
//public Toggle toggle1, toggle2, toggle3, toggle4, toggle5, toggle6, toggle7;
|
||||
/// <summary>
|
||||
/// 频段设置
|
||||
/// </summary>
|
||||
public List<Toggle> toggles = new List<Toggle>();
|
||||
/// <summary>
|
||||
/// 最终的波段
|
||||
/// </summary>
|
||||
|
@ -118,11 +122,6 @@ public class Spectrumdetection : MonoBehaviour
|
|||
|
||||
void Update()
|
||||
{
|
||||
//if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
||||
//{
|
||||
// onlyOne = false;
|
||||
// DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, rawImage);
|
||||
//}
|
||||
if (isStartRehearsing)
|
||||
{
|
||||
Camera1.gameObject.SetActive(true);
|
||||
|
@ -135,79 +134,36 @@ public class Spectrumdetection : MonoBehaviour
|
|||
{
|
||||
Frequencyiamge.gameObject.SetActive(false);
|
||||
});
|
||||
toggle1.onValueChanged.AddListener((ison) =>
|
||||
|
||||
foreach (Toggle toggle in toggles)
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
Frequency = "UHF";
|
||||
Camera1.cullingMask = 1 << 16;
|
||||
SweepFrequencyBandTo();
|
||||
}
|
||||
});
|
||||
toggle2.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
Frequency = "L";
|
||||
Camera1.cullingMask = 1 << 17;
|
||||
SweepFrequencyBandTo();
|
||||
}
|
||||
});
|
||||
toggle3.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
Frequency = "S";
|
||||
Camera1.cullingMask = 1 << 18;
|
||||
SweepFrequencyBandTo();
|
||||
}
|
||||
});
|
||||
toggle4.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
Frequency = "C";
|
||||
Camera1.cullingMask = 1 << 19;
|
||||
SweepFrequencyBandTo();
|
||||
}
|
||||
});
|
||||
toggle5.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
Frequency = "X";
|
||||
Camera1.cullingMask = 1 << 20;
|
||||
SweepFrequencyBandTo();
|
||||
}
|
||||
});
|
||||
toggle6.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
Frequency = "Ku";
|
||||
Camera1.cullingMask = 1 << 21;
|
||||
SweepFrequencyBandTo();
|
||||
}
|
||||
});
|
||||
toggle7.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
Frequency = "Ka";
|
||||
Camera1.cullingMask = (1 << 22);
|
||||
SweepFrequencyBandTo();
|
||||
}
|
||||
});
|
||||
toggle.onValueChanged.AddListener(delegate {
|
||||
FrequencyBandsValueChanged(toggle);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void SweepFrequencyBandTo()
|
||||
/// <summary>
|
||||
/// 频段设置方法
|
||||
/// </summary>
|
||||
/// <param name="change"></param>
|
||||
void FrequencyBandsValueChanged(Toggle change)
|
||||
{
|
||||
string nowData = GetSyncDataThree();
|
||||
MyNetMQClient.instance.Send(nowData);
|
||||
//DeviceManager.Instance.send2roomStr.Enqueue(nowData);
|
||||
//MQTTManager.instance.SendData(MQTTManager.instance.SweepFrequencyBand, nowData);
|
||||
if (change.isOn)
|
||||
{
|
||||
Frequency = change.transform.name;
|
||||
int layerValue = LayerMask.NameToLayer(Frequency);
|
||||
Camera1.cullingMask = (1 << layerValue);
|
||||
string nowData = GetSyncDataThree();
|
||||
MyNetMQClient.instance.Send(nowData);
|
||||
equipmentCommon.SetDatabaseInfo("scan_rate", Frequency);
|
||||
//DeviceManager.Instance.send2roomStr.Enqueue(nowData);
|
||||
//MQTTManager.instance.SendData(MQTTManager.instance.SweepFrequencyBand, nowData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void CameraFrequency(string _frequency)
|
||||
{
|
||||
int layerValue = LayerMask.NameToLayer(_frequency);
|
||||
|
@ -340,32 +296,9 @@ public class Spectrumdetection : MonoBehaviour
|
|||
string[] str = frequency.Split(',');
|
||||
for (int i = 0; i < str.Length; i++)
|
||||
{
|
||||
switch (str[i])
|
||||
{
|
||||
case "UHF":
|
||||
toggle1.gameObject.SetActive(true);
|
||||
break;
|
||||
case "L":
|
||||
toggle2.gameObject.SetActive(true);
|
||||
break;
|
||||
case "S":
|
||||
toggle3.gameObject.SetActive(true);
|
||||
break;
|
||||
case "C":
|
||||
toggle4.gameObject.SetActive(true);
|
||||
break;
|
||||
case "X":
|
||||
toggle5.gameObject.SetActive(true);
|
||||
break;
|
||||
case "Ku":
|
||||
toggle6.gameObject.SetActive(true);
|
||||
break;
|
||||
case "Ka":
|
||||
toggle7.gameObject.SetActive(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
var _tog = toggles.Find(x => x.transform.name == str[i]);
|
||||
if (_tog)
|
||||
_tog.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace AdamThinkDevicesData
|
|||
public class DataItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 设备id
|
||||
/// </summary>
|
||||
public string id ;
|
||||
/// <summary>
|
||||
|
@ -92,16 +92,29 @@ namespace AdamThinkDevicesData
|
|||
///
|
||||
/// </summary>
|
||||
public int device_count ;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string state;
|
||||
/// <summary>
|
||||
/// 部队信息
|
||||
/// </summary>
|
||||
public string bdxx;
|
||||
/// <summary>
|
||||
/// 线路
|
||||
/// </summary>
|
||||
public string line;
|
||||
/// <summary>
|
||||
/// 自身频率
|
||||
/// </summary>
|
||||
public string my_rate;
|
||||
/// <summary>
|
||||
/// 扫描频率
|
||||
/// </summary>
|
||||
public string scan_rate;
|
||||
|
||||
/// <summary>
|
||||
/// 坐标
|
||||
/// </summary>
|
||||
public string r1 ;
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -114,11 +127,18 @@ namespace AdamThinkDevicesData
|
|||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
public string r4;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string r5;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string r6;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<List_paraItem> list_para ;
|
||||
}
|
||||
[Serializable]
|
||||
|
|
|
@ -61,7 +61,7 @@ public class DragController : MonoBehaviour, IBeginDragHandler, IEndDragHandler,
|
|||
if (model.GetComponent<UnmannedAerialVehicleManage>())
|
||||
model.GetComponent<UnmannedAerialVehicleManage>().wrjModel = wrjModel;
|
||||
List<List_paraItem> temp = UIBootstrap.Instance.GetListParaItemById(deviceID);
|
||||
model.GetComponent<EquipmentCommon>().FillInTheData(temp);
|
||||
model.GetComponent<EquipmentCommon>().FillInTheData(temp,new AdamThinkDevicesData.DataItem());
|
||||
model.name = gameObject.name;
|
||||
if (!isDragWRJ)
|
||||
{
|
||||
|
|
|
@ -382,7 +382,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
}
|
||||
|
||||
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取别的客户端生成得设备
|
||||
/// </summary>
|
||||
|
@ -391,7 +391,9 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
/// <param name="deviceID"></param>
|
||||
public async void SpawnDevice(GameObject devicePrefab = null, string[] deviceInfo = null)
|
||||
{
|
||||
DeviceData deviceData = await AsyncWebReq.Get<DeviceData>(Url_QueryPracticeDevice + GlobalFlag.roomID + "&PracticeSubjectId=" + GlobalFlag.practiceSubjectID);
|
||||
string url = Url_QueryPracticeDevice + GlobalFlag.roomID + "&PracticeSubjectId=" + GlobalFlag.practiceSubjectID;
|
||||
Debug.Log("获取房间设备:" + url);
|
||||
DeviceData deviceData = await AsyncWebReq.Get<DeviceData>(url);
|
||||
if (devicePrefab != null && deviceInfo != null)
|
||||
{
|
||||
for (int i = 0; i < deviceData.data.Count; i++)
|
||||
|
@ -432,6 +434,12 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <param name="data"></param>
|
||||
/// <param name="tran"></param>
|
||||
public void SpawnDevice(GameObject obj, AdamThinkDevicesData.DataItem data, string[] tran = null)
|
||||
{
|
||||
GameObject device = Instantiate(obj);
|
||||
|
@ -447,6 +455,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
device.transform.position = new Vector3(float.Parse(deviceTran[0]), float.Parse(deviceTran[1]), float.Parse(deviceTran[2]));
|
||||
device.transform.eulerAngles = new Vector3(float.Parse(deviceTran[3]), float.Parse(deviceTran[4]), float.Parse(deviceTran[5]));
|
||||
}
|
||||
|
||||
UnmannedAerialVehicleManage uavm = device.GetComponent<UnmannedAerialVehicleManage>();
|
||||
if (!string.IsNullOrEmpty(data.r2) || data.r2 != "")
|
||||
{
|
||||
|
@ -460,22 +469,21 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
}
|
||||
}
|
||||
|
||||
if (uavm)
|
||||
{
|
||||
uavm.SetTipsColor();
|
||||
DroneViewDisplay.Instance.CreateUI(uavm, false);
|
||||
}
|
||||
|
||||
Debug.Log($"<color=yellow>是否是player{data.r3 == GlobalFlag.currentUser.user_id}</color>");
|
||||
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
|
||||
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para, data);
|
||||
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
||||
if (data.r3 == GlobalFlag.currentUser.user_id)
|
||||
{
|
||||
device.GetComponent<EquipmentCommon>().isPlayer = true;
|
||||
}
|
||||
if (uavm)
|
||||
{
|
||||
uavm.SetTipsColor();
|
||||
DroneViewDisplay.Instance.CreateUI(uavm, false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
FormationManager.Instance.WhenSpawn();
|
||||
|
||||
}
|
||||
|
||||
private void OnGetRoomUsers(string obj)
|
||||
|
|
|
@ -43,7 +43,7 @@ public static class InterfaceManager
|
|||
/// <summary>
|
||||
/// 修改设备单个属性
|
||||
/// </summary>
|
||||
public static string Url_UpdatePracticeDevicedetail { get => IpAddress + "/Handler/Thinkingfile.ashx?action=updatepracticedevicedetail&"; }
|
||||
public static string Url_UpdatePracticeDevicedetail { get => IpAddress + "/Handler/Thinkingfile.ashx?action=updatepracticedevicedetail"; }
|
||||
|
||||
/// <summary>
|
||||
/// 想定Wbe接口
|
||||
|
|
|
@ -130,11 +130,31 @@ public class EquipmentCommon : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
//参数:action:updatepracticedevicedetail
|
||||
//参数:id:设备id
|
||||
//参数:bdxx:部队信息
|
||||
//参数:line:线路
|
||||
//参数:my_rate:自身频率
|
||||
//参数:scan_rate:扫描频率
|
||||
|
||||
/// <summary>
|
||||
/// 修改数据库单个信息
|
||||
/// </summary>
|
||||
/// <param name="attribute"></param>
|
||||
/// <param name="newInfo"></param>
|
||||
public void SetDatabaseInfo(string attribute, string newInfo)
|
||||
{
|
||||
Dictionary<string, string> replaceInfoDic = new Dictionary<string, string>();
|
||||
replaceInfoDic.Add("id", deviceID);
|
||||
replaceInfoDic.Add(attribute, newInfo);
|
||||
StartCoroutine(AsyncWebReq.PostData2(Url_UpdatePracticeDevicedetail, replaceInfoDic));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 物体生成时接受数据
|
||||
/// </summary>
|
||||
/// <param name="weaponitemone"></param>
|
||||
public void FillInTheData(List<List_paraItem> weaponitemone)
|
||||
public void FillInTheData(List<List_paraItem> weaponitemone, AdamThinkDevicesData.DataItem data)
|
||||
{
|
||||
//向其他的单位发送创建信息
|
||||
if (isPlayer && equipmentCommon)//但是是由我自主创建的时候发送一次 且只发送一次
|
||||
|
@ -162,6 +182,11 @@ public class EquipmentCommon : MonoBehaviour
|
|||
UploadLog(deviceID);
|
||||
}));
|
||||
}
|
||||
if (data.my_rate != "")
|
||||
{
|
||||
weaponitemone = Weaponitemone(data);
|
||||
}
|
||||
|
||||
|
||||
//填入数据
|
||||
switch (equipmentType)
|
||||
|
@ -206,6 +231,18 @@ public class EquipmentCommon : MonoBehaviour
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="weaponitemone"></param>
|
||||
/// <returns></returns>
|
||||
public List<List_paraItem> Weaponitemone(AdamThinkDevicesData.DataItem data)
|
||||
{
|
||||
List<List_paraItem> _weaponitemone= data.list_para;
|
||||
|
||||
return _weaponitemone;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///上传日志
|
||||
/// </summary>
|
||||
|
|
|
@ -106,7 +106,12 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
/// <summary>
|
||||
/// 干扰的频率
|
||||
/// </summary>
|
||||
public Toggle toggle1, toggle2, toggle3, toggle4, toggle5, toggle6, toggle7;
|
||||
//public Toggle toggle1, toggle2, toggle3, toggle4, toggle5, toggle6, toggle7;
|
||||
|
||||
/// <summary>
|
||||
/// 探测频段设置
|
||||
/// </summary>
|
||||
public List<Toggle> togInterferenceBand = new List<Toggle>();
|
||||
/// <summary>
|
||||
/// 激活选择波段页面
|
||||
/// </summary>
|
||||
|
@ -138,62 +143,32 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
|
||||
private void Waveband()
|
||||
{
|
||||
toggle1.onValueChanged.AddListener((ison) =>
|
||||
|
||||
//探测频段设置
|
||||
foreach (Toggle toggle in togInterferenceBand)
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
disturb = "HUF";
|
||||
toggle.onValueChanged.AddListener(delegate { InterferenceBand(toggle); });
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
toggle2.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
disturb = "L";
|
||||
}
|
||||
});
|
||||
toggle3.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
disturb = "S";
|
||||
}
|
||||
});
|
||||
toggle4.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
disturb = "C";
|
||||
}
|
||||
});
|
||||
toggle5.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
disturb = "X";
|
||||
}
|
||||
});
|
||||
toggle6.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
disturb = "Ku";
|
||||
}
|
||||
});
|
||||
toggle7.onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
if (ison)
|
||||
{
|
||||
disturb = "Ka";
|
||||
}
|
||||
});
|
||||
buttonoff.onClick.AddListener(() =>
|
||||
{
|
||||
Waveimage.gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 探索频段设置
|
||||
/// </summary>
|
||||
/// <param name="change"></param>
|
||||
void InterferenceBand(Toggle change)
|
||||
{
|
||||
if (change.isOn)
|
||||
{
|
||||
disturb = change.transform.name;
|
||||
|
||||
equipmentCommon.SetDatabaseInfo("scan_rate", disturb);
|
||||
}
|
||||
}
|
||||
private void disturb1()
|
||||
{
|
||||
if (InterferingFrequency1.Length > 0)
|
||||
|
@ -201,32 +176,9 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
string[] str = InterferingFrequency1.Split(',');
|
||||
for (int i = 0; i < str.Length; i++)
|
||||
{
|
||||
switch (str[i])
|
||||
{
|
||||
case "UHF":
|
||||
toggle1.gameObject.SetActive(true);
|
||||
break;
|
||||
case "L":
|
||||
toggle2.gameObject.SetActive(true);
|
||||
break;
|
||||
case "S":
|
||||
toggle3.gameObject.SetActive(true);
|
||||
break;
|
||||
case "C":
|
||||
toggle4.gameObject.SetActive(true);
|
||||
break;
|
||||
case "X":
|
||||
toggle5.gameObject.SetActive(true);
|
||||
break;
|
||||
case "Ku":
|
||||
toggle6.gameObject.SetActive(true);
|
||||
break;
|
||||
case "Ka":
|
||||
toggle7.gameObject.SetActive(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
var tog = togInterferenceBand.Find(x => x.transform.name == str[i]);
|
||||
if(tog)
|
||||
tog.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -356,10 +308,8 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
//interval= float.Parse(InterferingFrequency);
|
||||
break;
|
||||
case "干扰模式:":
|
||||
//Debug.LogError(weaponitemone[i].para_value);
|
||||
switch (weaponitemone[i].para_value)
|
||||
{
|
||||
case "0":
|
||||
|
@ -371,11 +321,8 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
default:
|
||||
break;
|
||||
}
|
||||
//InterferenceMode = weaponitemone[i].para_value;
|
||||
break;
|
||||
case "发射功率:":
|
||||
//TransmittedPower = weaponitemone[i].para_value;
|
||||
//Debug.LogError(weaponitemone[i].para_value);
|
||||
switch (weaponitemone[i].para_value)
|
||||
{
|
||||
case "0":
|
||||
|
@ -392,7 +339,6 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
}
|
||||
break;
|
||||
case "干扰角度:":
|
||||
//Debug.LogError(weaponitemone[i].para_value);
|
||||
InterferenceAngle = weaponitemone[i].para_value;
|
||||
break;
|
||||
case "干扰距离:":
|
||||
|
@ -436,6 +382,7 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
}
|
||||
isDo = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 无人机整体驱离
|
||||
/// </summary>
|
||||
|
@ -445,10 +392,16 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
return string.Format("{0},{1},{2}", "WRJExpel", unmannedAerialVehicleManage.equipmentCommon.deviceID, InterferenceMode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="unmannedAerialVehicle"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetSyncData(UnmannedAerialVehicle unmannedAerialVehicle)
|
||||
{
|
||||
return string.Format("{0},{1},{2},{3}", "WRJDitch", unmannedAerialVehicle.unmannedAerialVehicleManage.equipmentCommon.deviceID, unmannedAerialVehicle.serialNumber, InterferenceMode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开启无线电干扰
|
||||
/// </summary>
|
||||
|
@ -460,7 +413,6 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
{
|
||||
if (colliders[i].transform.tag == "WRJ")
|
||||
{
|
||||
|
||||
UnmannedAerialVehicleManage unmannedAerialVehicleManage = colliders[i].GetComponent<UnmannedAerialVehicleManage>();
|
||||
//Debug.Log("检测到无人机: " + col.name);
|
||||
UnmannedAerialVehicle unmannedAerialVehicle = colliders[i].GetComponent<UnmannedAerialVehicle>();
|
||||
|
@ -479,9 +431,7 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
{
|
||||
WRJs.Enqueue(unmannedAerialVehicleManage.transform);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if (unmannedAerialVehicle)
|
||||
{
|
||||
|
@ -499,7 +449,6 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
WRJs.Enqueue(unmannedAerialVehicle.transform);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -555,12 +504,10 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
if (float.Parse(InterferenceAngle) >= angue)
|
||||
{
|
||||
//Debug.LogError("目标出现在范围内");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//Debug.LogError("目标没有出现在范围里面");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,19 +232,10 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
public void SetGroupTipsAndDatabaseInfo(int index)
|
||||
{
|
||||
SetGroupTips(index);
|
||||
SetDatabaseInfo("bdxx", index.ToString());
|
||||
equipmentCommon.SetDatabaseInfo("bdxx", index.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改数据库单个信息
|
||||
/// </summary>
|
||||
public void SetDatabaseInfo(string attribute, string newInfo)
|
||||
{
|
||||
Dictionary<string, string> replaceInfoDic = new Dictionary<string, string>();
|
||||
replaceInfoDic.Add("id", equipmentCommon.deviceID);
|
||||
replaceInfoDic.Add(attribute, newInfo);
|
||||
StartCoroutine(AsyncWebReq.PostData2(Url_UpdatePracticeDevicedetail, replaceInfoDic));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 频段设置
|
||||
|
@ -259,6 +250,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
gamePos.layer = layerValue;
|
||||
string nowData = GetSyncDataTwo();
|
||||
MyNetMQClient.instance.Send(nowData);
|
||||
equipmentCommon.SetDatabaseInfo("my_rate", dataLinkCommunicationFrequency);
|
||||
//DeviceManager.Instance.send2roomStr.Enqueue(nowData);
|
||||
//MQTTManager.instance.SendData(MQTTManager.instance.BandSetting, nowData);
|
||||
}
|
||||
|
@ -288,6 +280,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
dzWRJCamera.cullingMask = 1 << layerValue;
|
||||
string nowData = GetSyncDataThree();
|
||||
MyNetMQClient.instance.Send(nowData);
|
||||
equipmentCommon.SetDatabaseInfo("scan_rate", electronicReconnaissanceCapability);
|
||||
//DeviceManager.Instance.send2roomStr.Enqueue(nowData);
|
||||
//MQTTManager.instance.SendData(MQTTManager.instance.SweepFrequencyBand, nowData);
|
||||
}
|
||||
|
@ -659,14 +652,10 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
if (toggle.transform.name == dataLinkCommunicationFrequency)
|
||||
toggle.isOn = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "电子侦察能力:":
|
||||
string date2 = GetFrequencyBand(weaponitemone[i].para_value);
|
||||
|
||||
string[] dates2 = date2.Split(',');
|
||||
if (dates2.Length > 0)
|
||||
{
|
||||
|
@ -816,6 +805,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
tips.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
public LayerMask layerMask = new LayerMask();
|
||||
/// <summary>
|
||||
/// 检测无线电频率
|
||||
|
@ -886,9 +876,6 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
#region 阵型编队
|
||||
/// <summary>
|
||||
/// 阵型选择
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 89bf32eab74fb804cb8efb0450b3de60
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue