void JoinMatch(NetworkID networkID, LobbyManager lobbyManager) { lobbyManager.DisplayIsConnecting(); lobbyManager.matchMaker.JoinMatch(networkID, "", lobbyManager.OnMatchJoined); lobbyManager.backDelegate = lobbyManager.StopClientClbk; lobbyManager.isMatchmaking = true; }
void Start() { Singleton = this; _lobbyHooks = GetComponent<LobbyHook>(); currentPanel = startMenu; backButton.gameObject.SetActive(false); GetComponent<Canvas>().enabled = true; DontDestroyOnLoad(gameObject); SetServerInfo("Offline", "None"); }
public void Populate(MatchDesc match, LobbyManager lobbyManager, Color c) { serverInfoText.text = match.name; slotInfo.text = match.currentSize.ToString() + "/" + match.maxSize.ToString(); NetworkID networkID = match.networkId; joinButton.onClick.RemoveAllListeners(); joinButton.onClick.AddListener(() => { JoinMatch(networkID, lobbyManager); }); GetComponent<Image>().color = c; }