This commit is contained in:
parent
705ce05d79
commit
d083d913b7
|
@ -185,7 +185,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
|
|
|
@ -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.Generic;
|
||||
using UnityEngine;
|
||||
|
@ -44,17 +45,20 @@ public class Conversionfrequency : MonoBehaviour
|
|||
});
|
||||
verify_buttn.onClick.AddListener(() =>
|
||||
{
|
||||
Smallfrequency = dropdown.value;
|
||||
terrestrialRadioInterferenceManger.Interference(Smallfrequency);
|
||||
//Smallfrequency = dropdown.value;
|
||||
terrestrialRadioInterferenceManger.InterferingFrequency= dropdown.options[dropdown.value].text;
|
||||
//terrestrialRadioInterferenceManger.Interference(Smallfrequency);
|
||||
transform.gameObject.SetActive(false);
|
||||
string msg = $"send2room EditorDevice,{terrestrialRadioInterferenceManger.equipmentCommon.deviceID},{terrestrialRadioInterferenceManger.InterferingFrequency}";
|
||||
_ = SyncCreateRoom.SendMessageAsync(msg);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 1113159741}
|
||||
m_IndirectSpecularColor: {r: 0.16231456, g: 0.30614573, b: 0.66931695, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.16234905, g: 0.3061682, b: 0.669197, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
@ -63100,7 +63100,7 @@ MonoBehaviour:
|
|||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
randSeed: 1780006765
|
||||
randSeed: 1793377296
|
||||
isDoingTransition: 0
|
||||
minimumHeight: 0
|
||||
--- !u!114 &1820978574
|
||||
|
|
|
@ -8,7 +8,7 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
|||
/// <summary>
|
||||
/// 所有设备
|
||||
/// </summary>
|
||||
public List<EquipmentCommon> devices = new List<EquipmentCommon>();
|
||||
public List<EquipmentCommon> devices = new List<EquipmentCommon>();
|
||||
/// <summary>
|
||||
/// 发送消息
|
||||
/// </summary>
|
||||
|
@ -55,7 +55,7 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
|||
public bool isOnlyOne = true;
|
||||
private void Update()
|
||||
{
|
||||
if (send2roomStr.Count > 0&&isOnlyOne)
|
||||
if (send2roomStr.Count > 0 && isOnlyOne)
|
||||
{
|
||||
isOnlyOne = false;
|
||||
StartCoroutine(DequeueSend2roomStr());
|
||||
|
@ -68,7 +68,7 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
|||
{
|
||||
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", send2roomStr.Dequeue()));
|
||||
yield return new WaitForSeconds(0.05f);
|
||||
if(send2roomStr.Count==0)
|
||||
if (send2roomStr.Count == 0)
|
||||
isOnlyOne = true;
|
||||
}
|
||||
}
|
||||
|
@ -87,10 +87,18 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
|||
Debug.LogError("设备..:" + data);
|
||||
string[] info = data.Split(',');
|
||||
if (info.Length < 2) return;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ using Newtonsoft.Json.Linq;
|
|||
public static class InterfaceManager
|
||||
{
|
||||
|
||||
private static string _IP = "172.16.1.41";
|
||||
private static string _IP = "192.168.138.15";
|
||||
public static string IP
|
||||
{
|
||||
get { return _IP; }
|
||||
|
|
|
@ -46,11 +46,6 @@ public class RadarManger : MonoBehaviour
|
|||
/// </summary>
|
||||
public float interval = 5.0f;
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 飞机不显示在小地图上
|
||||
/// <summary>
|
||||
public GameObject minimap;
|
||||
/// <summary>
|
||||
/// 雷达UI预制体
|
||||
/// </summary>
|
||||
|
@ -299,33 +294,26 @@ public class RadarManger : MonoBehaviour
|
|||
Mincamera.orthographicSize = detectionRadius;
|
||||
if (colliders2.Count > 0)
|
||||
{
|
||||
|
||||
for (int i = 0; i < colliders2.Count; i++)
|
||||
if (Random.value > (1 - float.Parse(DetectionSuccessRate)/100))
|
||||
{
|
||||
if (i <= NumberOfProbes)
|
||||
for (int i = 0; i < colliders2.Count; i++)
|
||||
{
|
||||
|
||||
if (Random.value > (1 - float.Parse(DetectionSuccessRate) / 1000))
|
||||
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
||||
if (unmannedAerialVehicle)
|
||||
{
|
||||
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
||||
if (unmannedAerialVehicle)
|
||||
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false));
|
||||
if (laserFireControlPlatformManger)
|
||||
{
|
||||
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false));
|
||||
if (laserFireControlPlatformManger)
|
||||
{
|
||||
laserFireControlPlatformManger.isLasing = true;
|
||||
Debug.Log(laserFireControlPlatformManger.transform.name + "攻击无人机: " + unmannedAerialVehicle.transform.name);
|
||||
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
||||
laserFireControlPlatformManger.Lasing();
|
||||
}
|
||||
number++;
|
||||
laserFireControlPlatformManger.isLasing = true;
|
||||
Debug.Log(laserFireControlPlatformManger.transform.name + "攻击无人机: " + unmannedAerialVehicle.transform.name);
|
||||
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
||||
laserFireControlPlatformManger.Lasing();
|
||||
}
|
||||
number++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
minimap.GetComponent<Camera>().cullingMask = ~(1 << 15);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -334,7 +322,7 @@ public class RadarManger : MonoBehaviour
|
|||
{
|
||||
Debug.LogError("鼠标进入");
|
||||
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()
|
||||
|
|
Loading…
Reference in New Issue