From e6567cccf239217a1f5912343ea325d5297a1b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E5=90=8D?= <3077614386@qq.com> Date: Tue, 23 Jan 2024 10:19:54 +0800 Subject: [PATCH] 1 --- Assets/Temp/Scripts/Mastermanagement.cs | 5 +++-- .../Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/Temp/Scripts/Mastermanagement.cs b/Assets/Temp/Scripts/Mastermanagement.cs index e3cc64a3..743a4bc4 100644 --- a/Assets/Temp/Scripts/Mastermanagement.cs +++ b/Assets/Temp/Scripts/Mastermanagement.cs @@ -50,7 +50,7 @@ public class Mastermanagement : MonoBehaviour { for (int i = 0; i < dragControllers.Count; i++) { - if (dragControllers[i].gameObject.name == game.name) + if (dragControllers[i].gameObject.name == game.name && !dragControllers[i].gameObject.activeSelf) { dragControllers[i].gameObject.SetActive(false); break; @@ -62,9 +62,10 @@ public class Mastermanagement : MonoBehaviour { for (int i = 0; i < dragControllers.Count; i++) { - if (dragControllers[i].gameObject.name == game.name) + if (dragControllers[i].gameObject.name == game.name&& !dragControllers[i].gameObject.activeSelf) { dragControllers[i].gameObject.SetActive(true); + break; } } } diff --git a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs index 1fb79860..29c3924c 100644 --- a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs +++ b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs @@ -340,7 +340,8 @@ public class UnmannedAerialVehicleManage : MonoBehaviour { string nowData = GetSyncData(attackTarget); Debug.Log(nowData); - _ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData)); + //_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData)); + DeviceManager.Instance.send2roomStr.Enqueue(nowData); } /// /// 无人机攻击目标传递