This commit is contained in:
parent
55a7e3e109
commit
b3743f199c
|
@ -30,6 +30,7 @@ public class FormationManager : MonoSingleton<FormationManager>
|
|||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
SyncCreateRoom.send2roomRequset += OnReciveMsg;
|
||||
startFormationBtn.onClick.AddListener(OnStartFormation);
|
||||
submitFormationBtn.onClick.AddListener(OnSubmit);
|
||||
cancelFormationBtn.onClick.AddListener(OnCancel);
|
||||
|
@ -183,12 +184,12 @@ public class FormationManager : MonoSingleton<FormationManager>
|
|||
isStartFormation = false;
|
||||
|
||||
string infoTemp = "";
|
||||
for (int i = 0; i < formationInfo.uavms.Count; i++)
|
||||
for (int i = 0; i < formationIDs.Count; i++)
|
||||
{
|
||||
infoTemp += formationInfo.uavms[i].equipmentCommon.deviceID + ",";
|
||||
infoTemp += formationIDs[i] + ",";
|
||||
}
|
||||
SendGroupToOther(formationInfos.Count.ToString(), infoTemp);
|
||||
Debug.Log($"<color=blue>{infoTemp}</color>");
|
||||
formationIDs.Clear();
|
||||
CheckBtns(0);
|
||||
}
|
||||
|
||||
|
@ -196,6 +197,7 @@ public class FormationManager : MonoSingleton<FormationManager>
|
|||
private char[] separators = { ',' }; // 设置分隔符为逗号
|
||||
public void OnReciveMsg(string reciveInfo)
|
||||
{
|
||||
Debug.Log($"<color=blue>{reciveInfo}</color>");
|
||||
List<UnmannedAerialVehicleManage> uavms = GetAllWRJ();
|
||||
|
||||
var result = reciveInfo.Split(separators) // 对字符串进行切割操作
|
||||
|
|
Loading…
Reference in New Issue