示例#1
0
 protected override void Purchase(MarketLot lot)
 {
     Debug.Log("IOSBilling. Purchase lot:" + lot);
     if (_canMakePayments)
     {
         StoreKitBinding.purchaseProduct(lot.ProductIOSIdentifier, 1);
     }
 }
示例#2
0
        static MarketLot()
        {
            RemoveAds = new MarketLot
            {
                Id    = "RemoveAds",
                Price = 0.99f,
                ProductIOSIdentifier     = "com.consumedmedia.retro2048removeads",
                ProductAndroidIdentifier = "com.consumedmedia.retro2048removeads"
            };

            UndoPack1 = new MarketLot
            {
                Id     = "UndoPack1",
                Amount = 5,
                Price  = 0.99f,
                ProductIOSIdentifier     = "com.consumedmedia.retro2048.pack1",
                ProductAndroidIdentifier = "com.consumedmedia.retro2048.pack1"
            };

            UndoPack2 = new MarketLot
            {
                Id     = "UndoPack2",
                Amount = 15,
                Price  = 1.99f,
                ProductIOSIdentifier     = "com.consumedmedia.retro2048.pack2",
                ProductAndroidIdentifier = "com.consumedmedia.retro2048.pack2"
            };

            UndoPack3 = new MarketLot
            {
                Id     = "UndoPack3",
                Amount = 50,
                Price  = 5.99f,
                ProductIOSIdentifier     = "com.consumedmedia.retro2048.pack3",
                ProductAndroidIdentifier = "com.consumedmedia.retro2048.pack3"
            };

            AllLots = new List <MarketLot> {
                RemoveAds, UndoPack1, UndoPack2, UndoPack3
            };
        }
示例#3
0
 protected void CompletePurchase(MarketLot lot)
 {
     Debug.Log("Purchase completed:" + lot.Id);
     if (lot == MarketLot.UndoPack1)
     {
         UndoBtn.undoCnt += 5;
     }
     else if (lot == MarketLot.UndoPack2)
     {
         UndoBtn.undoCnt += 15;
     }
     else if (lot == MarketLot.UndoPack3)
     {
         UndoBtn.undoCnt += 50;
     }
     else if (lot == MarketLot.RemoveAds)
     {
         UserData.adRemoved = true;
         GoogleMobileAdsPlugin.HideBannerView();
     }
 }
示例#4
0
 protected override void Purchase(MarketLot lot)
 {
     CompletePurchase(lot);
 }
示例#5
0
 protected override void Purchase(MarketLot lot)
 {
     Debug.Log("AndroidBilling. Purchase lot:" + lot);
     GoogleIAB.purchaseProduct(lot.ProductAndroidIdentifier);
 }
示例#6
0
 protected override void Purchase(MarketLot lot)
 {
     Debug.Log("Error! Call AndroidBilling Purchase from not Android build.");
 }
示例#7
0
 protected override void Purchase(MarketLot lot)
 {
     Debug.Log("Error! Call IOSBilling Purchase from not iOS build.");
 }
示例#8
0
 protected abstract void Purchase(MarketLot lot);
示例#9
0
 public static void RequestPurchase(MarketLot marketLot)
 {
     _instance.Purchase(marketLot);
 }