This commit is contained in:
parent
addc37e8a8
commit
49dd61e697
|
@ -226,6 +226,7 @@ GameObject:
|
||||||
- component: {fileID: 2132962760}
|
- component: {fileID: 2132962760}
|
||||||
- component: {fileID: 2132962758}
|
- component: {fileID: 2132962758}
|
||||||
- component: {fileID: 2132962761}
|
- component: {fileID: 2132962761}
|
||||||
|
- component: {fileID: 2132962762}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Net
|
m_Name: Net
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -289,3 +290,17 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
PubIP: 127.0.0.1:8082
|
PubIP: 127.0.0.1:8082
|
||||||
SubIP: 127.0.0.1:8081
|
SubIP: 127.0.0.1:8081
|
||||||
|
--- !u!114 &2132962762
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2132962757}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5557d4b6fd90bcc489289539bebe43b0, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
currentRoomArea:
|
||||||
|
RSclient: {fileID: 0}
|
||||||
|
|
|
@ -2,6 +2,7 @@ using AdamSync;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
public class DeviceManager : MonoSingleton<DeviceManager>
|
public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
{
|
{
|
||||||
|
@ -37,7 +38,8 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
OnActivationChanged += OnActivationChangedHandler;
|
OnActivationChanged += OnActivationChangedHandler;
|
||||||
|
|
||||||
//接收实时传输数据
|
//接收实时传输数据
|
||||||
SyncCreateRoom.send2roomRequset += GetSend2roomMsg;
|
//SyncCreateRoom.send2roomRequset += GetSend2roomMsg;
|
||||||
|
LoadManage.Instance.reciveData += GetSend2roomMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
|
@ -184,10 +186,9 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
/// <param name="data"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void GetSend2roomMsg(string data)
|
public void GetSend2roomMsg(byte[] tt)
|
||||||
{
|
{
|
||||||
|
string data = Encoding.UTF8.GetString(tt).Replace("send2room", "");
|
||||||
data = data.Replace("send2room", "");
|
|
||||||
string[] info = data.Split(',');
|
string[] info = data.Split(',');
|
||||||
if (info.Length < 2) return;
|
if (info.Length < 2) return;
|
||||||
|
|
||||||
|
|
|
@ -387,6 +387,8 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
{
|
{
|
||||||
return string.Format("{0},{1},{2}", "DroneWasDestroyed", unmannedAerialVehicle.unmannedAerialVehicleManage.equipmentCommon.deviceID, unmannedAerialVehicle.serialNumber);
|
return string.Format("{0},{1},{2}", "DroneWasDestroyed", unmannedAerialVehicle.unmannedAerialVehicleManage.equipmentCommon.deviceID, unmannedAerialVehicle.serialNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 隐藏激光
|
/// 隐藏激光
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -256,6 +256,7 @@ public class RadarManger : MonoBehaviour
|
||||||
isTimerRunning = true;
|
isTimerRunning = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>s
|
/// <summary>s
|
||||||
/// 停止
|
/// 停止
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -263,11 +264,9 @@ public class RadarManger : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (equipmentCommon.isPlayer && timerCoroutine != null)
|
if (equipmentCommon.isPlayer && timerCoroutine != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
StopCoroutine(timerCoroutine);
|
StopCoroutine(timerCoroutine);
|
||||||
timerCoroutine = null;
|
timerCoroutine = null;
|
||||||
isTimerRunning = false;
|
isTimerRunning = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -329,6 +329,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Spectrumdetection.Radius > 0)
|
if (Spectrumdetection.Radius > 0)
|
||||||
{
|
{
|
||||||
gxWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000;
|
gxWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000;
|
||||||
|
@ -1094,6 +1095,11 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_positions"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public IEnumerator MoveObjectAlongPath(Vector3 _positions) // 协程:按路线移动物体
|
public IEnumerator MoveObjectAlongPath(Vector3 _positions) // 协程:按路线移动物体
|
||||||
{
|
{
|
||||||
Vector3 targetPosition = new Vector3(_positions.x, hight, _positions.z);// 目标位置为当前顶点坐标
|
Vector3 targetPosition = new Vector3(_positions.x, hight, _positions.z);// 目标位置为当前顶点坐标
|
||||||
|
@ -1105,6 +1111,13 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
yield return new WaitForSeconds(_time); // 等待一帧时间
|
yield return new WaitForSeconds(_time); // 等待一帧时间
|
||||||
isMove = true;
|
isMove = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_positions"></param>
|
||||||
|
/// <param name="_isMove"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public IEnumerator MoveObjectAlongPath(Vector3 _positions, bool _isMove) // 协程:按路线移动物体
|
public IEnumerator MoveObjectAlongPath(Vector3 _positions, bool _isMove) // 协程:按路线移动物体
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System;
|
using System;
|
||||||
|
@ -54,6 +54,10 @@ public class MyNetMQClient : MonoBehaviour
|
||||||
_netMqPublisher.typeName = typename;
|
_netMqPublisher.typeName = typename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发送消息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="msg"></param>
|
||||||
public void Send(string msg)
|
public void Send(string msg)
|
||||||
{
|
{
|
||||||
_netMqPublisher.AddMessageToSendQue("Room", 0, Encoding.UTF8.GetBytes(msg));
|
_netMqPublisher.AddMessageToSendQue("Room", 0, Encoding.UTF8.GetBytes(msg));
|
||||||
|
|
Loading…
Reference in New Issue