From d4bb384209d1a4b1cb3c400461f7fb37f37b5b9f Mon Sep 17 00:00:00 2001 From: YangHua <1475658476@qq.com> Date: Tue, 27 Feb 2024 00:35:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=84=E6=A0=87=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Zion/Scripts/Adam/FormationManager.cs | 1 + .../UAV/UnmannedAerialVehicleManage.cs | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Assets/Zion/Scripts/Adam/FormationManager.cs b/Assets/Zion/Scripts/Adam/FormationManager.cs index 01252b95..fbd28178 100644 --- a/Assets/Zion/Scripts/Adam/FormationManager.cs +++ b/Assets/Zion/Scripts/Adam/FormationManager.cs @@ -60,6 +60,7 @@ public class FormationManager : MonoSingleton { uavmTemp.isGroup = true; uavmTemp.groupId = formationInfo.groupIndex; + uavmTemp.SetGroupTips(formationInfo.groupIndex); formationInfo.uavms.Add(uavmTemp); } } diff --git a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs index 5650e9bd..a86dbd92 100644 --- a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs +++ b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs @@ -65,7 +65,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour public int groupId = -1; public bool isGroup = false; - + /// /// 无人机预制体 /// @@ -201,6 +201,18 @@ public class UnmannedAerialVehicleManage : MonoBehaviour } + /// + /// 设置组得标志 + /// + public void SetGroupTips(int index) + { + UnmannedAerialVehicle uav = unmannedAerialVehicles[0]; + if (uav != null) + { + uav.tips.text = uav.tips.text + "\n" + "组" + index.ToString(); + } + } + /// /// 频段设置 ///