void Update()
    {
        ConnectPanel.SetActive(!isConnect);
        LobbyPanel.SetActive(inLobby);
        CreateRoomPanel.SetActive(inCreateRoom);
        JoinRoomPanel.SetActive(inJoinRoom);
        ChatPanel.SetActive(inChatRoom);

        if (inChatRoom == true)
        {
            if (Input.GetKeyDown(KeyCode.Return))
            {
                SentBotton();
            }

            if (Input.GetKeyDown(KeyCode.KeypadEnter))
            {
                SentBotton();
            }
        }

        LobbyUserName.text      = "Hi ! \n{ " + myName + " }";
        CreateRoomUserName.text = myName;
        JoinRoomUserName.text   = myName;

        HereIs.text = "Here is... " + roomName + " !!!";

        LoginPanel.SetActive(inLogin);
        RegisterPanel.SetActive(inRegister);
        RePasswordPanel.SetActive(inRePassword);
    }
Beispiel #2
0
    void Awake()
    {
        createRoomBtn   = transform.FindChild("CreateRoomBtn").GetComponent <Button>();
        createRoomPanel = transform.FindChild("CreateRoomPanel").GetComponent <CreateRoomPanel>();

        createRoomPanel.Init();
        createRoomBtn.onClick.AddListener(OnCreateRoomBtn);
    }