This commit is contained in:
YangHua 2024-02-29 22:48:53 +08:00
parent 8f41ba628e
commit 5cbeb0097e
1 changed files with 4 additions and 6 deletions

View File

@ -27,10 +27,13 @@ public class FormationManager : MonoSingleton<FormationManager>
public FormationInfo formationInfo;
public List<UnmannedAerialVehicleManage> allUavms = new List<UnmannedAerialVehicleManage>();
public List<string> formationIDs = new List<string>();
void Awake()
{
SyncCreateRoom.send2roomRequset += OnReciveMsg;
}
// Start is called before the first frame update
void Start()
{
startFormationBtn.onClick.AddListener(OnStartFormation);
submitFormationBtn.onClick.AddListener(OnSubmit);
cancelFormationBtn.onClick.AddListener(OnCancel);
@ -42,10 +45,6 @@ public class FormationManager : MonoSingleton<FormationManager>
startFormationBtn.gameObject.SetActive(index == 0);
submitFormationBtn.gameObject.SetActive(index == 1);
cancelFormationBtn.gameObject.SetActive(index == 1);
if(index == 0)
{
SyncCreateRoom.send2roomRequset -= OnReciveMsg;
}
}
// Update is called once per frame
@ -180,7 +179,6 @@ public class FormationManager : MonoSingleton<FormationManager>
public void OnStartFormation()
{
isStartFormation = true;
SyncCreateRoom.send2roomRequset += OnReciveMsg;
CheckBtns(1);
}