Beispiel #1
0
        public static void GrantUserItem(string playFabId, string itemId)
        {
            var grantRequest = new ServerModels.GrantItemsToUserRequest();

            grantRequest.PlayFabId = playFabId;
            grantRequest.ItemIds   = new List <string>()
            {
                itemId
            };
            PlayFabServerAPI.GrantItemsToUser(grantRequest, GrantUserItemCallback, PfSharedControllerEx.FailCallback("GrantItemsToUser"));
        }
Beispiel #2
0
 public static Action GrantUserItem(string playFabId, string itemId)
 {
     Action output = () =>
     {
         var grantRequest = new ServerModels.GrantItemsToUserRequest();
         grantRequest.PlayFabId = playFabId;
         grantRequest.ItemIds = new List<string>() { itemId };
         PlayFabServerAPI.GrantItemsToUser(grantRequest, GrantUserItemCallback, PfSharedControllerEx.FailCallback("GrantItemsToUser"));
     };
     return output;
 }