private MatchmakingPlayerAttributes GetMatchmakingAttribute(string attributeValue)
        {
            var attributes = new MatchmakingPlayerAttributes();

            attributes.DataObject = QueueConfiguration.IsQuickPlay ?
                                    (new { Skill = attributeValue }) :
                                    (object)new { LobbyId = attributeValue };

            return(attributes);
        }
Пример #2
0
        private CreateMatchmakingTicketRequest GetCreateRequest(MatchmakingPlayerAttributes attributes)
        {
            var request = new CreateMatchmakingTicketRequest
            {
                Creator               = MatchmakingHelper.GetMatchmakingPlayer(Player, attributes),
                GiveUpAfterSeconds    = QueueConfiguration.GiveUpAfterSeconds,
                QueueName             = QueueConfiguration.QueueName,
                AuthenticationContext = PlayFabAuthenticationContext
            };

            return(request);
        }
Пример #3
0
 public static MatchmakingPlayer GetMatchmakingPlayer(PlayerInfo player, MatchmakingPlayerAttributes attributes)
 {
     return(new MatchmakingPlayer
     {
         Attributes = attributes,
         Entity = new EntityKey
         {
             Id = player.Entity.Id,
             Type = player.Entity.Type,
         },
     });
 }