Exemplo 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);
        }
Exemplo n.º 2
0
 PurchaseProcessingResult IStoreListener.ProcessPurchase(PurchaseEventArgs e)
 {
     //Report purchase to GOW
     Gow.ReportPurchase(e);
     if (PurchaseCompleted != null)
     {
         PurchaseCompleted(e);
     }
     return(PurchaseProcessingResult.Complete);
 }
Exemplo 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);
     }
 }
Exemplo 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("#.##");
            }
        }
Exemplo n.º 5
0
 private void UnityPurchasingInitialized()
 {
     //Init Gow
     Gow.Init();
 }
Exemplo n.º 6
0
 public void GetSpecialOffers()
 {
     //Get special offers from GOW
     Gow.GetSpecialOffers(error => { });
 }
Exemplo n.º 7
0
 public void SubscribeToNotifications()
 {
     //Subscribe to push notifications if not autosubscribe
     Gow.SubscribeToNotifications();
 }