Beispiel #1
0
    private void GameSelectEnter()
    {
        Panel_Lobby panel_Lobby = (Panel_Lobby)UIManager.Instance.GetPanel(PUID.Lobby);

        if (panel_Lobby != null)
        {
            panel_Lobby.InitShow();
            UIManager.Instance.ShowPanel(PUID.Lobby);
        }
        else
        {
            Debug.LogError("不存在该ID的Panel");
        }
    }
    public void Connect()
    {
        string[] IP_PORT = entry.text.Split(':');
        if (IP_PORT.Length != 2)
        {
            Debug.Log("Invalid IP!");
        }

        string IP   = IP_PORT[0];
        int    PORT = int.Parse(IP_PORT[1]);

        Network.connectToServer(IP, PORT);
        gameObject.SetActive(false);
        Panel_Lobby.SetActive(true);
    }