Esempio n. 1
0
        protected override void InitStore()
        {
            //Init GOW with products
            Gow.Initialized += Initialized;
            var products = infos.Select(i => i.name).ToArray();

            Gow.Init(products);
        }
Esempio n. 2
0
 PurchaseProcessingResult IStoreListener.ProcessPurchase(PurchaseEventArgs e)
 {
     //Report purchase to GOW
     Gow.ReportPurchase(e);
     if (PurchaseCompleted != null)
     {
         PurchaseCompleted(e);
     }
     return(PurchaseProcessingResult.Complete);
 }
Esempio n. 3
0
 protected override void Buy()
 {
     if (replacement != null)
     {
         //buy over GOW if its special offer product
         Gow.Buy(replacement);
     }
     else
     {
         //buy over GOW if its regular product
         Gow.Buy(info.name);
     }
 }
Esempio n. 4
0
        public void UpdateView()
        {
            if (!info)
            {
                return;
            }
            _coins.text  = info.coins.ToString();
            _price.text  = "$" + info.price.ToString();
            _icon.sprite = info.icon;
            _so.enabled  = false;

            replacement = Gow.GetReplacement(info.name);
            if (replacement != null)
            {
                Debug.Log("Best price");
                _so.enabled = true;
                _price.text = "$" + replacement.price.ToString("#.##");
            }
        }
Esempio n. 5
0
 private void UnityPurchasingInitialized()
 {
     //Init Gow
     Gow.Init();
 }
Esempio n. 6
0
 public void GetSpecialOffers()
 {
     //Get special offers from GOW
     Gow.GetSpecialOffers(error => { });
 }
Esempio n. 7
0
 public void SubscribeToNotifications()
 {
     //Subscribe to push notifications if not autosubscribe
     Gow.SubscribeToNotifications();
 }