数据上传处理
This commit is contained in:
parent
21b1bd9b66
commit
c6ab90e1ec
|
@ -164,6 +164,17 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发送消息
|
||||||
|
/// </summary>
|
||||||
|
public Queue<string> send2roomStr = new Queue<string>();
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (send2roomStr.Count > 0)
|
||||||
|
{
|
||||||
|
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", send2roomStr.Dequeue()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//位置实时传送
|
//位置实时传送
|
||||||
private string latestData = "";
|
private string latestData = "";
|
||||||
|
|
|
@ -264,9 +264,10 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
|
|
||||||
public void SendMsg(Transform attackTarget)
|
public void SendMsg(Transform attackTarget)
|
||||||
{
|
{
|
||||||
var nowData = GetSyncData(attackTarget);
|
string nowData = GetSyncData(attackTarget);
|
||||||
Debug.Log(nowData);
|
Debug.Log(nowData);
|
||||||
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
|
unmannedAerialVehicleManage.equipmentCommon.send2roomStr.Enqueue(nowData);
|
||||||
|
//_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue