void JoinMatch(NetworkID networkID, LobbyManager lobbyManager)
        {
            LobbyManagerUI.Instance.DisplayIsConnecting();
            LobbyManagerUI.Instance.backDelegate = LobbyManagerUI.Instance.StopClientClbk;

            lobbyManager.matchMaker.JoinMatch(networkID, "", lobbyManager.OnMatchJoined);
            lobbyManager.isMatchmaking = true;
        }
        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;
        }
Example #3
0
        //繼承 NetworkLobbyManager 不能使用 Awake 會出現 No Lobby for LobbyPlayer
        //public void Awake()
        //{
        //}
        void Start()
        {
            s_Singleton = this;

            //_lobbyHooks = GetComponent<UnityStandardAssets.Network.LobbyHook>();
        }