Exemple #1
0
        public void SetupBundlePurchaseDetails(ItemBundleInfo bundle)
        {
            CloudGoodsBundle bundlePriceState;

            if (bundle.StandardPrice <= 0 && bundle.PremiumPrice <= 0)
            {
                bundlePriceState = CloudGoodsBundle.Free;
            }
            else if (bundle.StandardPrice <= 0)
            {
                bundlePriceState = CloudGoodsBundle.CreditPurchasable;
            }
            else if (bundle.PremiumPrice <= 0)
            {
                bundlePriceState = CloudGoodsBundle.CoinPurchasable;
            }
            else
            {
                bundlePriceState = CloudGoodsBundle.CreditCoinPurchaseable;
            }

            ChangePurchaseButtonDisplay(bundle.PremiumPrice, bundle.StandardPrice, bundlePriceState);

            currentItemBundle = bundle;

            BundleName.text = bundle.Name;
            SetUpBundleItemsDisplay(bundle.Items);
        }
Exemple #2
0
 void Update()
 {
     if (bundlePurchasing.currentItemBundle != itemBundle)
     {
         currentBundleIndex = 0;
         itemBundle         = bundlePurchasing.currentItemBundle;
         SetBundleItemToDisplay(currentBundleIndex);
     }
 }
Exemple #3
0
        public void SetupUnityUIItemBundle(ItemBundleInfo newItemBundle, UnityUIBundlePurchasing purchasing)
        {
            itemBundle       = newItemBundle;
            bundlePurchasing = purchasing;

            ItemTextureCache.GetItemTexture(itemBundle.Image, OnReceivedItemTexture);
            StoreItemText.text = itemBundle.Name;

            Button button = GetComponent <Button>();

            button.onClick.AddListener(OnClickedItemBundle);

            ChangePurchaseButtonDisplay(itemBundle.PremiumPrice, itemBundle.StandardPrice);
        }
Exemple #4
0
 void Start()
 {
     currentBundleIndex = 0;
     itemBundle         = bundlePurchasing.currentItemBundle;
     SetBundleItemToDisplay(currentBundleIndex);
 }