void Start() { lobbySingleton = this; currentPanel = mainPanel; GetComponent <Canvas>().enabled = true; mainPanel.gameObject.SetActive(true); DontDestroyOnLoad(gameObject); // Makes sure that the lobby manager is not destroyed even when the scene changes }
public void Populate(MatchInfoSnapshot match, PLobbyManager lobbyManager, Color c) { serverInfoText.text = match.name; NetworkID networkID = match.networkId; joinButton.onClick.RemoveListener(); joinButton.onClick.AddListener(() => { JoinMatch(networkID, lobbyManager); }); GetComponent <Image> ().color = c; }
public void Populate(MatchInfoSnapshot match, PLobbyManager lobbyManager, Color c) { string matchName; if ((matchName = match.name).Equals("")) { //Debug.Log (PLobbyManager.lobbySingleton.matchInfo.networkId.ToString ()); matchName = "Collusion " + PLobbyManager.lobbySingleton.matchInfo.networkId.ToString(); } matchName = match.networkId.ToString(); serverInfoText.text = matchName; NetworkID networkID = match.networkId; joinButton.onClick.RemoveAllListeners(); joinButton.onClick.AddListener(() => { JoinMatch(networkID, lobbyManager); }); GetComponent <Image> ().color = c; }
void JoinMatch(NetworkID networkID, PLobbyManager lobbyManager) { lobbyManager.matchMaker.JoinMatch(networkID, "", "", "", 0, 0, lobbyManager.OnMatchJoined); lobbyManager._isMatchMaking = true; lobbyManager.DisplayIsConnecting("CLIENT"); }
void JoinMatch(NetworkID networkID, PLobbyManager lobbyManager) { lobbyManager.matchMaker.JoinMatch(networkID, "", "", "", 0, 0, lobbyManager.OnMatchJoined); lobbyManager._isMatchMaking = true; }