コード例 #1
0
        public static Task <Connection> JoinRoomAsync(this Multiplayer multiplayer, string roomId, Dictionary <string, string> joinData)
        {
            var tcs = new TaskCompletionSource <Connection>();

            multiplayer.JoinRoom(roomId, joinData, tcs.SetResult, tcs.SetException);
            return(tcs.Task);
        }
コード例 #2
0
 public Connection Join(Multiplayer m)
 => (this.Type == ConnectType.CreateJoinRoom ?
     m.CreateJoinRoom(this.RoomId, this.RoomType, this.Visible, this.RoomData, this.JoinData)
                         : m.JoinRoom(this.RoomId, this.JoinData)
     );