public void PickUp()
 {
     Debug.Log("Clicked: " + gameObject.name);
     if (!isPickedUp)
     {
         ItemVoucherComponent voucherComponent = GetComponent<ItemVoucherComponent>();
         List<RedeemItemVouchersRequest.ItemVoucherSelection> selectionList = new List<RedeemItemVouchersRequest.ItemVoucherSelection>();
         selectionList.Add(new RedeemItemVouchersRequest.ItemVoucherSelection(voucherComponent.voucherInformation.VoucherId, voucherComponent.voucherInformation.Information.Id, voucherComponent.voucherInformation.Amount, ContainerLocation));
         RedeemItemVouchersRequest request = new RedeemItemVouchersRequest(selectionList, null);
         CallHandler.Instance.RedeemItemVoucher(request, UpdatedStacksCallback);
     }
 }
 public static void RedeemItemVouchers(RedeemItemVouchersRequest request, Action<UpdatedStacksResponse> callback)
 {
     CallHandler.Instance.RedeemItemVoucher(request, callback);
 }
示例#3
0
 public void RedeemItemVoucher(RedeemItemVouchersRequest request, Action<UpdatedStacksResponse> callback)
 {
     StartCoroutine(ServiceGetString(callObjectCreator.CreateRedeemItemVouchersCall(request), x =>
     {
         callback(responseCreator.CreateUpdatedStacksResponse(x));
     }));
 }
 public WWW CreateRedeemItemVouchersCall(RedeemItemVouchersRequest request)
 {
     return GenerateWWWPost("RedeemItemVouchers", request);
 }