Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
bd633a2f00
|
@ -185,7 +185,7 @@ RectTransform:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1586417955185665358}
|
m_GameObject: {fileID: 1586417955185665358}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children:
|
m_Children:
|
||||||
|
|
|
@ -797,11 +797,11 @@ MonoBehaviour:
|
||||||
m_Value: 0
|
m_Value: 0
|
||||||
m_Options:
|
m_Options:
|
||||||
m_Options:
|
m_Options:
|
||||||
- m_Text: 1227.60 MHz
|
- m_Text: 1227.60MHz
|
||||||
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
||||||
- m_Text: 1381.05 MHz
|
- m_Text: 1381.05MHz
|
||||||
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
||||||
- m_Text: 1575.42 MHz
|
- m_Text: 1575.42MHz
|
||||||
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
||||||
- m_Text: 2GHz
|
- m_Text: 2GHz
|
||||||
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
||||||
|
@ -890,7 +890,7 @@ MonoBehaviour:
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 0
|
||||||
m_VerticalOverflow: 0
|
m_VerticalOverflow: 0
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: 1227.60 MHz
|
m_Text: 1227.60MHz
|
||||||
--- !u!1 &1649737330324479757
|
--- !u!1 &1649737330324479757
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
172.16.1.41:48888
|
192.168.138.15:48888
|
|
@ -1 +1 @@
|
||||||
172.16.1.41
|
192.168.138.15
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using AdamSync;
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
@ -44,17 +45,21 @@ public class Conversionfrequency : MonoBehaviour
|
||||||
});
|
});
|
||||||
verify_buttn.onClick.AddListener(() =>
|
verify_buttn.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
Smallfrequency = dropdown.value;
|
//Smallfrequency = dropdown.value;
|
||||||
terrestrialRadioInterferenceManger.Interference(Smallfrequency);
|
terrestrialRadioInterferenceManger.InterferingFrequency= dropdown.options[dropdown.value].text;
|
||||||
|
Debug.LogError(terrestrialRadioInterferenceManger.InterferingFrequency);
|
||||||
|
//terrestrialRadioInterferenceManger.Interference(Smallfrequency);
|
||||||
transform.gameObject.SetActive(false);
|
transform.gameObject.SetActive(false);
|
||||||
|
string msg = $"send2room EditorDevice,{terrestrialRadioInterferenceManger.equipmentCommon.deviceID},{terrestrialRadioInterferenceManger.InterferingFrequency}";
|
||||||
|
_ = SyncCreateRoom.SendMessageAsync(msg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1494,13 +1494,13 @@ public class Scenariopage : MonoBehaviour
|
||||||
switch (value)
|
switch (value)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
frequency_text.text = "1227.60 MHz";
|
frequency_text.text = "1227.60MHz";
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
frequency_text.text = "1381.05 MHz";
|
frequency_text.text = "1381.05MHz";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
frequency_text.text = "1575.42 MHz";
|
frequency_text.text = "1575.42MHz";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
frequency_text.text = "2GHz";
|
frequency_text.text = "2GHz";
|
||||||
|
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 1113159741}
|
m_Sun: {fileID: 1113159741}
|
||||||
m_IndirectSpecularColor: {r: 0.16231456, g: 0.30614573, b: 0.66931695, a: 1}
|
m_IndirectSpecularColor: {r: 0.165218, g: 0.3075422, b: 0.6572481, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
|
@ -63100,7 +63100,7 @@ MonoBehaviour:
|
||||||
m_PreInfinity: 2
|
m_PreInfinity: 2
|
||||||
m_PostInfinity: 2
|
m_PostInfinity: 2
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
randSeed: 1780006765
|
randSeed: 1859322953
|
||||||
isDoingTransition: 0
|
isDoingTransition: 0
|
||||||
minimumHeight: 0
|
minimumHeight: 0
|
||||||
--- !u!114 &1820978574
|
--- !u!114 &1820978574
|
||||||
|
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 0}
|
m_Sun: {fileID: 0}
|
||||||
m_IndirectSpecularColor: {r: 0.16521391, g: 0.30764452, b: 0.6578343, a: 1}
|
m_IndirectSpecularColor: {r: 0.165218, g: 0.3075422, b: 0.6572481, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
|
@ -11717,7 +11717,7 @@ MonoBehaviour:
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 0
|
||||||
m_VerticalOverflow: 0
|
m_VerticalOverflow: 0
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: 1227.60 MHz
|
m_Text: 1227.60MHz
|
||||||
--- !u!222 &168482738
|
--- !u!222 &168482738
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -49818,11 +49818,11 @@ MonoBehaviour:
|
||||||
m_Value: 0
|
m_Value: 0
|
||||||
m_Options:
|
m_Options:
|
||||||
m_Options:
|
m_Options:
|
||||||
- m_Text: 1227.60 MHz
|
- m_Text: 1227.60MHz
|
||||||
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
||||||
- m_Text: 1381.05 MHz
|
- m_Text: 1381.05MHz
|
||||||
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
||||||
- m_Text: 1575.42 MHz
|
- m_Text: 1575.42MHz
|
||||||
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
||||||
- m_Text: 2GHz
|
- m_Text: 2GHz
|
||||||
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
m_Image: {fileID: 21300000, guid: ab029b3f9356df54eb7dfe16e97c79ea, type: 3}
|
||||||
|
@ -51166,7 +51166,7 @@ MonoBehaviour:
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 0
|
||||||
m_VerticalOverflow: 0
|
m_VerticalOverflow: 0
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: 1227.60 MHz
|
m_Text: 1227.60MHz
|
||||||
--- !u!222 &638510552
|
--- !u!222 &638510552
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -79930,11 +79930,11 @@ MonoBehaviour:
|
||||||
m_Value: 0
|
m_Value: 0
|
||||||
m_Options:
|
m_Options:
|
||||||
m_Options:
|
m_Options:
|
||||||
- m_Text: 1227.60 MHz
|
- m_Text: 1227.60MHz
|
||||||
m_Image: {fileID: 21300000, guid: aee371e0f91624d4194218195a5abb8f, type: 3}
|
m_Image: {fileID: 21300000, guid: aee371e0f91624d4194218195a5abb8f, type: 3}
|
||||||
- m_Text: 1381.05 MHz
|
- m_Text: 1381.05MHz
|
||||||
m_Image: {fileID: 21300000, guid: aee371e0f91624d4194218195a5abb8f, type: 3}
|
m_Image: {fileID: 21300000, guid: aee371e0f91624d4194218195a5abb8f, type: 3}
|
||||||
- m_Text: 1575.42 MHz
|
- m_Text: 1575.42MHz
|
||||||
m_Image: {fileID: 21300000, guid: aee371e0f91624d4194218195a5abb8f, type: 3}
|
m_Image: {fileID: 21300000, guid: aee371e0f91624d4194218195a5abb8f, type: 3}
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
|
@ -106459,7 +106459,7 @@ MonoBehaviour:
|
||||||
m_PreInfinity: 2
|
m_PreInfinity: 2
|
||||||
m_PostInfinity: 2
|
m_PostInfinity: 2
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
randSeed: 678732734
|
randSeed: 1860173453
|
||||||
isDoingTransition: 0
|
isDoingTransition: 0
|
||||||
minimumHeight: 0
|
minimumHeight: 0
|
||||||
--- !u!114 &1820978574
|
--- !u!114 &1820978574
|
||||||
|
|
|
@ -8,7 +8,7 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所有设备
|
/// 所有设备
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<EquipmentCommon> devices = new List<EquipmentCommon>();
|
public List<EquipmentCommon> devices = new List<EquipmentCommon>();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发送消息
|
/// 发送消息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -32,7 +32,7 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
public event System.Action<bool> OnActivationChanged;
|
public event System.Action<bool> OnActivationChanged;
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
SyncCreateRoom.send2roomRequset += GetSend2roomMsg;
|
SyncCreateRoom.send2roomRequset += GetSend2roomMsg;
|
||||||
|
@ -55,7 +55,7 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
public bool isOnlyOne = true;
|
public bool isOnlyOne = true;
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (send2roomStr.Count > 0&&isOnlyOne)
|
if (send2roomStr.Count > 0 && isOnlyOne)
|
||||||
{
|
{
|
||||||
isOnlyOne = false;
|
isOnlyOne = false;
|
||||||
StartCoroutine(DequeueSend2roomStr());
|
StartCoroutine(DequeueSend2roomStr());
|
||||||
|
@ -68,7 +68,7 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
{
|
{
|
||||||
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", send2roomStr.Dequeue()));
|
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", send2roomStr.Dequeue()));
|
||||||
yield return new WaitForSeconds(0.05f);
|
yield return new WaitForSeconds(0.05f);
|
||||||
if(send2roomStr.Count==0)
|
if (send2roomStr.Count == 0)
|
||||||
isOnlyOne = true;
|
isOnlyOne = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,10 +87,19 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
Debug.LogError("设备..:" + data);
|
Debug.LogError("设备..:" + data);
|
||||||
string[] info = data.Split(',');
|
string[] info = data.Split(',');
|
||||||
if (info.Length < 2) return;
|
if (info.Length < 2) return;
|
||||||
|
|
||||||
EquipmentCommon equipmentCommon = devices.Find(x => x.deviceID == info[1]);
|
EquipmentCommon equipmentCommon = devices.Find(x => x.deviceID == info[1]);
|
||||||
if (equipmentCommon)
|
if (info[0] == "EditorDevice")
|
||||||
{
|
{
|
||||||
equipmentCommon.ReceivingPositionAngle(info);
|
equipmentCommon.GetComponent<TerrestrialRadioInterferenceManger>().InterferingFrequency = info[2];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (equipmentCommon)
|
||||||
|
{
|
||||||
|
equipmentCommon.ReceivingPositionAngle(info);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,11 +46,6 @@ public class RadarManger : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float interval = 5.0f;
|
public float interval = 5.0f;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 飞机不显示在小地图上
|
|
||||||
/// <summary>
|
|
||||||
public GameObject minimap;
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 雷达UI预制体
|
/// 雷达UI预制体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -299,33 +294,26 @@ public class RadarManger : MonoBehaviour
|
||||||
Mincamera.orthographicSize = detectionRadius;
|
Mincamera.orthographicSize = detectionRadius;
|
||||||
if (colliders2.Count > 0)
|
if (colliders2.Count > 0)
|
||||||
{
|
{
|
||||||
|
if (Random.value > (1 - float.Parse(DetectionSuccessRate)/100))
|
||||||
for (int i = 0; i < colliders2.Count; i++)
|
|
||||||
{
|
{
|
||||||
if (i <= NumberOfProbes)
|
for (int i = 0; i < colliders2.Count; i++)
|
||||||
{
|
{
|
||||||
|
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
||||||
if (Random.value > (1 - float.Parse(DetectionSuccessRate) / 1000))
|
if (unmannedAerialVehicle)
|
||||||
{
|
{
|
||||||
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false));
|
||||||
if (unmannedAerialVehicle)
|
if (laserFireControlPlatformManger)
|
||||||
{
|
{
|
||||||
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false));
|
laserFireControlPlatformManger.isLasing = true;
|
||||||
if (laserFireControlPlatformManger)
|
Debug.Log(laserFireControlPlatformManger.transform.name + "攻击无人机: " + unmannedAerialVehicle.transform.name);
|
||||||
{
|
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
||||||
laserFireControlPlatformManger.isLasing = true;
|
laserFireControlPlatformManger.Lasing();
|
||||||
Debug.Log(laserFireControlPlatformManger.transform.name + "攻击无人机: " + unmannedAerialVehicle.transform.name);
|
|
||||||
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
|
||||||
laserFireControlPlatformManger.Lasing();
|
|
||||||
}
|
|
||||||
number++;
|
|
||||||
}
|
}
|
||||||
|
number++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
minimap.GetComponent<Camera>().cullingMask = ~(1 << 15);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -334,7 +322,7 @@ public class RadarManger : MonoBehaviour
|
||||||
{
|
{
|
||||||
Debug.LogError("鼠标进入");
|
Debug.LogError("鼠标进入");
|
||||||
RadarUi.transform.localScale = Vector3.one;
|
RadarUi.transform.localScale = Vector3.one;
|
||||||
Mincamera.transform.position = new Vector3(transform.position.x,350, transform.position.z);
|
Mincamera.transform.position = new Vector3(transform.position.x, 350, transform.position.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMouseExit()
|
private void OnMouseExit()
|
||||||
|
|
|
@ -441,7 +441,7 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
private void Angularrange()
|
private void Angularrange()
|
||||||
{
|
{
|
||||||
Collider[] collider = Physics.OverlapSphere(transform.position, 300);
|
Collider[] collider = Physics.OverlapSphere(transform.position,300);
|
||||||
for (int i = 0; i < collider.Length; i++)
|
for (int i = 0; i < collider.Length; i++)
|
||||||
{
|
{
|
||||||
if (collider[i].transform.tag == "WRJ")
|
if (collider[i].transform.tag == "WRJ")
|
||||||
|
|
|
@ -338,13 +338,13 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
switch (weaponitemone[i].para_value)
|
switch (weaponitemone[i].para_value)
|
||||||
{
|
{
|
||||||
case "0":
|
case "0":
|
||||||
satellitePositioningFrequency = "1227.60 MHz";
|
satellitePositioningFrequency = "1227.60MHz";
|
||||||
break;
|
break;
|
||||||
case "1":
|
case "1":
|
||||||
satellitePositioningFrequency = "1381.05 MHz";
|
satellitePositioningFrequency = "1381.05MHz";
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
satellitePositioningFrequency = "1575.42 MHz";
|
satellitePositioningFrequency = "1575.42MHz";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue