Ejemplo n.º 1
0
 void JoinMatch(NetworkID networkID, LobbyManager lobbyManager)
 {
     lobbyManager.DisplayIsConnecting();
     lobbyManager.matchMaker.JoinMatch(networkID, "", lobbyManager.OnMatchJoined);
     lobbyManager.backDelegate = lobbyManager.StopClientClbk;
     lobbyManager.isMatchmaking = true;
 }
Ejemplo n.º 2
0
        void Start()
        {
            Singleton = this;
            _lobbyHooks = GetComponent<LobbyHook>();
			currentPanel = startMenu;

            backButton.gameObject.SetActive(false);
            GetComponent<Canvas>().enabled = true;

            DontDestroyOnLoad(gameObject);

            SetServerInfo("Offline", "None");
        }
Ejemplo n.º 3
0
        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;
        }