示例#1
0
 public void BuyIAPPProduct(IAPProduct product)
 {
     Executer.GetInstance().AddJob(() =>
     {
         GoogleIAPManager.GetInstance().BuyProduct(product.id);
     });
 }
示例#2
0
 private void Awake()
 {
     product = GoogleIAPManager.GetInstance().GetProductWithID(id);
     price   = (float)product.metadata.localizedPrice;
     base.Awake();
     priceText.text += " €";
 }
示例#3
0
    void OnEnable()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
            return;
        }

        DontDestroyOnLoad(gameObject);

        if (storeController == null)
        {
            InitializePurchasing();
        }
    }
示例#4
0
 private void OnDisable()
 {
     GoogleAdsManager.GetInstance().UnsubscribeToRewardClaimed(AdRewardEarned);
     GoogleIAPManager.GetInstance().UnsubscribeToProductPurchased(IapProductPurchased);
 }