This commit is contained in:
parent
92932a10e1
commit
8f41ba628e
|
@ -30,7 +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);
|
||||
|
@ -42,6 +42,10 @@ 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
|
||||
|
@ -176,6 +180,7 @@ public class FormationManager : MonoSingleton<FormationManager>
|
|||
public void OnStartFormation()
|
||||
{
|
||||
isStartFormation = true;
|
||||
SyncCreateRoom.send2roomRequset += OnReciveMsg;
|
||||
CheckBtns(1);
|
||||
}
|
||||
|
||||
|
@ -292,7 +297,11 @@ public class FormationManager : MonoSingleton<FormationManager>
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Debug.Log("OnDisable FormationManager");
|
||||
SyncCreateRoom.send2roomRequset -= OnReciveMsg;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue