private void back(object sender, EventArgs args) { if (PhotonNetwork.inRoom) { PhotonNetwork.LeaveRoom(); } backButton.Inactive(); if (matchingType == MatchingType.League) { StartCoroutine(OutMenu(() => { leagueManager.gameObject.SetActive(true); leagueManager.InMenu(() => backButton.Active()); gameObject.SetActive(false); })); } if (matchingType == MatchingType.Club) { StartCoroutine(OutMenu(() => { clubManager.gameObject.SetActive(true); clubManager.InMenu(() => backButton.Active()); gameObject.SetActive(false); })); } }
public void OnPressedLeagueButton() { backButton.Inactive(); OutMenu(() => { leagueManager.gameObject.SetActive(true); leagueManager.InMenu(() => backButton.Active()); gameObject.SetActive(false); }); }
private void Awake() { menuManager.gameObject.SetActive(false); leagueManager.gameObject.SetActive(false); clubManager.gameObject.SetActive(false); waitingManager.gameObject.SetActive(false); if (PhotonNetwork.inRoom) { Debug.Log("PhotonNetwork.inRoom"); backButton.Inactive(); waitingManager.gameObject.SetActive(true); waitingManager.InMenu(() => backButton.Active()); return; } if (LobbyManager.LeagueLobby.Equals(PhotonNetwork.lobby)) { backButton.Inactive(); leagueManager.gameObject.SetActive(true); leagueManager.InMenu(() => backButton.Active()); return; } if (LobbyManager.ClubLobby.Equals(PhotonNetwork.lobby)) { backButton.Inactive(); clubManager.gameObject.SetActive(true); clubManager.InMenu(() => backButton.Active()); return; } backButton.Inactive(); menuManager.gameObject.SetActive(true); menuManager.InMenu(() => backButton.Active()); }