Example #1
0
 private Action GetFinishActionMaterial(ShopReceiver.PaymentPurchaseData purchaseData)
 {
     return(delegate
     {
         GameSection.ChangeStayEvent("BUNDLE_NOTICE", purchaseData);
         GameSection.ResumeEvent(true, null);
     });
 }
Example #2
0
    private Action GetFinishActionBundle(ShopReceiver.PaymentPurchaseData purchaseData)
    {
        return(delegate
        {
            _disableChest();
            GlobalSettingsManager.PackParam.PackInfo pack = MonoBehaviourSingleton <GlobalSettingsManager> .I.packParam.GetPack(purchaseData.productId);

            GameSection.ChangeStayEvent(string.IsNullOrEmpty(pack.eventName) ? "BUNDLE_NOTICE" : pack.eventName, purchaseData);
            GameSection.ResumeEvent(true, null);
        });
    }
Example #3
0
 private void OnBuyBundle(ShopReceiver.PaymentPurchaseData purchaseData)
 {
     if (purchaseData != null && purchaseData.bundle != null)
     {
         isPurchase = false;
         Action finishActionBundle = GetFinishActionBundle(purchaseData);
         SendRequestCurrentPresentAndShopList(finishActionBundle);
     }
     if (isPurchase)
     {
         _enableChest();
         GameSection.ResumeEvent(false, null);
     }
 }
Example #4
0
 private void OnBuyMaterial(ShopReceiver.PaymentPurchaseData purchaseData)
 {
     if (purchaseData != null)
     {
         isPurchase = false;
         SendRequestCurrentPresentAndShopList(delegate
         {
             //IL_0011: Unknown result type (might be due to invalid IL or missing references)
             GameSection.ChangeStayEvent("BUY_SUCCESS", null);
             this.StartCoroutine("DoReloadMarketData");
         });
     }
     if (isPurchase)
     {
         GameSection.ResumeEvent(false, null);
     }
 }
Example #5
0
    private void OnBuyMaterial(ShopReceiver.PaymentPurchaseData purchaseData)
    {
        if (purchaseData != null)
        {
            isPurchase = false;
            int         index = 0;
            ProductData data  = null;
            MonoBehaviourSingleton <ShopManager> .I.GetPurchaseItem(purchaseData.productId, ref data, ref index);

            Action onFinish = GetFinishAction(index, data);
            MonoBehaviourSingleton <PresentManager> .I.SendGetPresent(0, delegate
            {
                onFinish();
            });
        }
        if (isPurchase)
        {
            GameSection.ResumeEvent(false, null);
        }
    }
Example #6
0
 public override void Initialize()
 {
     purchaseData = (GameSection.GetEventData() as ShopReceiver.PaymentPurchaseData);
     base.Initialize();
 }