コード例 #1
0
    void UpdatePurchasedList(List <BazaarPurchase> purchases)
    {
        purchasedList.Clear();

        foreach (BazaarPurchase purch in purchases)
        {
            BillingPurchase itemPurched = ConvertToBillingPurches(purch);
            purchasedList.Add(itemPurched);

            Debug.Log(itemPurched.ToString());
        }
    }
コード例 #2
0
    protected void UpdateConsumedList(BillingPurchase consumedItem)
    {
        BillingPurchase beforeConsumed = consumedList.Find(item => {
            if (item.OrderId == consumedItem.OrderId &&
                item.DeveloperPayload == consumedItem.DeveloperPayload &&
                item.ProductId == consumedItem.ProductId)
            {
                return(true);
            }
            return(false);
        });

        if (beforeConsumed == null)
        {
            consumedList.Add(consumedItem);
        }

        Debug.Log("Add consumed item to list:" + consumedItem.ToString());
    }