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
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
SyncCreateRoom.send2roomRequset += OnReciveMsg;
|
|
||||||
startFormationBtn.onClick.AddListener(OnStartFormation);
|
startFormationBtn.onClick.AddListener(OnStartFormation);
|
||||||
submitFormationBtn.onClick.AddListener(OnSubmit);
|
submitFormationBtn.onClick.AddListener(OnSubmit);
|
||||||
cancelFormationBtn.onClick.AddListener(OnCancel);
|
cancelFormationBtn.onClick.AddListener(OnCancel);
|
||||||
|
@ -42,6 +42,10 @@ public class FormationManager : MonoSingleton<FormationManager>
|
||||||
startFormationBtn.gameObject.SetActive(index == 0);
|
startFormationBtn.gameObject.SetActive(index == 0);
|
||||||
submitFormationBtn.gameObject.SetActive(index == 1);
|
submitFormationBtn.gameObject.SetActive(index == 1);
|
||||||
cancelFormationBtn.gameObject.SetActive(index == 1);
|
cancelFormationBtn.gameObject.SetActive(index == 1);
|
||||||
|
if(index == 0)
|
||||||
|
{
|
||||||
|
SyncCreateRoom.send2roomRequset -= OnReciveMsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
|
@ -176,6 +180,7 @@ public class FormationManager : MonoSingleton<FormationManager>
|
||||||
public void OnStartFormation()
|
public void OnStartFormation()
|
||||||
{
|
{
|
||||||
isStartFormation = true;
|
isStartFormation = true;
|
||||||
|
SyncCreateRoom.send2roomRequset += OnReciveMsg;
|
||||||
CheckBtns(1);
|
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