void JoinMatch(NetworkID networkID, DankLobbyManager lobbyManager) { lobbyManager.matchMaker.JoinMatch(networkID, "", lobbyManager.OnMatchJoined); lobbyManager.backDelegate = lobbyManager.StopClientClbk; lobbyManager.isMatchmaking = true; lobbyManager.DisplayIsConnecting(); }
public void Populate(MatchDesc match, DankLobbyManager 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; }
void Start() { s_Singleton = this; _lobbyHooks = GetComponent<UnityStandardAssets.Network.LobbyHook>(); currentPanel = mainMenuPanel; backButton.gameObject.SetActive(false); GetComponent<Canvas>().enabled = true; DontDestroyOnLoad(gameObject); SetServerInfo("Offline", "None"); }