コード例 #1
0
    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
    }
コード例 #2
0
    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;
    }
コード例 #3
0
    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;
    }
コード例 #4
0
 void JoinMatch(NetworkID networkID, PLobbyManager lobbyManager)
 {
     lobbyManager.matchMaker.JoinMatch(networkID, "", "", "", 0, 0, lobbyManager.OnMatchJoined);
     lobbyManager._isMatchMaking = true;
     lobbyManager.DisplayIsConnecting("CLIENT");
 }
コード例 #5
0
 void JoinMatch(NetworkID networkID, PLobbyManager lobbyManager)
 {
     lobbyManager.matchMaker.JoinMatch(networkID, "", "", "", 0, 0, lobbyManager.OnMatchJoined);
     lobbyManager._isMatchMaking = true;
 }