Пример #1
0
        public VirtualGood Complete()
        {
            PurchaseType purchase;

            if (currency == StoreItem.Currency.Dollars)
                purchase = new PurchaseWithMarket(sku, price);
            else
                purchase = new PurchaseWithVirtualItem("seed", Mathf.CeilToInt(price));

            return new SingleUsePackVG (itemId, itemCount, name, description, id, purchase);
        }
Пример #2
0
        public VirtualGood Complete()
        {
            VirtualGood good;
            PurchaseType purchase = null;

            if (currency == Currency.Dollars)
                purchase = new PurchaseWithMarket(sku, price);
            if (currency == Currency.Seeds)
                purchase = new PurchaseWithVirtualItem("seed", Mathf.CeilToInt(price));

            if (consumable)
                good = new SingleUseVG(name, description, id, purchase);
            else
                good = new LifetimeVG(name, description, id, purchase);
            return good;
        }