示例#1
0
文件: SignIn.cs 项目: Ponsukeee/Vcom
 public void SendInfo()
 {
     if (!Client.InRoom)
     {
         Client.Signin(userName.inputText.text, password.inputText.text);
     }
 }
示例#2
0
        private async void Update()
        {
            if (Input.GetKeyDown(KeyCode.A))
            {
                Client.Signin("test", "test");
            }

            if (Input.GetKeyDown(KeyCode.B))
            {
                Client.LeaveRoom();
            }

            if (Input.GetKeyDown(KeyCode.C))
            {
                Debug.Log("Start");
                var roomInfos = await Client.GetRooms();

                foreach (var roomInfo in roomInfos)
                {
                    Debug.Log($"オーナー = {roomInfo.OwnerName}, ID = {roomInfo.RoomID}");
                }
                Debug.Log(roomInfos.Length);
            }

            if (Input.GetKeyDown(KeyCode.D))
            {
                var roomInfos = await Client.GetRooms();

                Client.JoinRoom(roomInfos[0].RoomID);
            }
        }