添加组标志

This commit is contained in:
YangHua 2024-02-27 00:35:11 +08:00
parent 3555b0dcc0
commit d4bb384209
2 changed files with 14 additions and 1 deletions

View File

@ -60,6 +60,7 @@ public class FormationManager : MonoSingleton<FormationManager>
{
uavmTemp.isGroup = true;
uavmTemp.groupId = formationInfo.groupIndex;
uavmTemp.SetGroupTips(formationInfo.groupIndex);
formationInfo.uavms.Add(uavmTemp);
}
}

View File

@ -65,7 +65,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
public int groupId = -1;
public bool isGroup = false;
/// <summary>
/// 无人机预制体
/// </summary>
@ -201,6 +201,18 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
}
/// <summary>
/// 设置组得标志
/// </summary>
public void SetGroupTips(int index)
{
UnmannedAerialVehicle uav = unmannedAerialVehicles[0];
if (uav != null)
{
uav.tips.text = uav.tips.text + "\n" + "组" + index.ToString();
}
}
/// <summary>
/// 频段设置
/// </summary>