Esempio n. 1
0
 /// <summary>
 /// Tries to open the purchase dialog this product via Unity IAP.
 /// </summary>
 public void Purchase()
 {
     #if UNITY_PURCHASING
     if (!buyable)
     {
         return;
     }
     UnityIAPManager.PurchaseProduct(id);
     #endif
 }
Esempio n. 2
0
 /// <summary>
 /// Tries to open the purchase dialog this product via Unity IAP.
 /// </summary>
 public void Purchase()
 {
     #if UNITY_ANALYTICS
     if (!buyable)
     {
         return;
     }
     UnityIAPManager.PurchaseProduct(id);
     #endif
 }
Esempio n. 3
0
        /// <summary>
        /// Tries to open the purchase dialog this product via Unity IAP.
        /// </summary>
        public void Purchase(int money)
        {
            if (uimain.MoneyAmount > money)
            {
                #if UNITY_ANALYTICS
                if (!buyable)
                {
                    return;
                }
                UnityIAPManager.PurchaseProduct(id);
                #endif

                uimain.MoneyAmount -= money;
            }
        }