void Start() { s_Singleton = this; _lobbyHooks = GetComponent <Assets.Lobby.LobbyHook>(); currentPanel = mainMenuPanel; backButton.gameObject.SetActive(false); GetComponent <Canvas>().enabled = true; DontDestroyOnLoad(gameObject); SetServerInfo("Offline", "None"); }
public void Populate(MatchInfoSnapshot 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; }