Beispiel #1
0
        private void OnInitializeFailed(InitializationFailureReason reason)
        {
            if (log != null)
            {
                log.text = reason.ToString();
            }

            UserEventsTracker.TrackEvent("Purchase screen. OnInitializeFailed:" + reason.ToString());

            purchaseButton.interactable = false;
        }
Beispiel #2
0
        void Start()
        {
            UserEventsTracker.TrackEvent("Purchase screen. Start");

            _iapModule = new UnityIAP();
            _iapModule.Init(OnInitializeFailed);

            EventsChannel.General.Subscribe(EventConstants.PurchaseSuccess, (o, o1) =>
            {
                UserEventsTracker.TrackEvent("Purchase screen. Success purchase");

                OnSuccessPurchase();
            });

            EventsChannel.General.Subscribe(EventConstants.PurchaseFailed, (o, o1) =>
            {
                UserEventsTracker.TrackEvent("Purchase screen. Purchase failed:" + o1.ToString());

                OnFailedPurchase((PurchaseFailureReason)o1);
            });
        }
Beispiel #3
0
        public void Back()
        {
            UserEventsTracker.TrackEvent("Purchase screen. Back button clicked");

            SceneManager.LoadScene(Constants.MenuSceneName);
        }
Beispiel #4
0
        void Purchase()
        {
            UserEventsTracker.TrackEvent("Purchase screen. Click purchase");

            _iapModule.BuyProduct();
        }