Esempio n. 1
0
        public void onGoodUpgrade(string message)
        {
            StoreUtils.LogDebug(TAG, "SOOMLA/UNITY onGoodUpgrade:" + message);

            string[] vars = Regex.Split(message, "#SOOM#");

            VirtualGood vg  = (VirtualGood)StoreInfo.GetItemByItemId(vars[0]);
            UpgradeVG   vgu = (UpgradeVG)StoreInfo.GetItemByItemId(vars[1]);

            StoreEvents.OnGoodUpgrade(vg, vgu);
        }
Esempio n. 2
0
 void Awake()
 {
     if (instance == null)               // making sure we only initialize one instance.
     {
         instance = this;
         GameObject.DontDestroyOnLoad(this.gameObject);
     }
     else                                                // Destroying unused instances.
     {
         GameObject.Destroy(this.gameObject);
     }
 }
Esempio n. 3
0
        public void onGoodBalanceChanged(string message)
        {
            StoreUtils.LogDebug(TAG, "SOOMLA/UNITY onGoodBalanceChanged:" + message);

            string[] vars = Regex.Split(message, "#SOOM#");

            VirtualGood vg          = (VirtualGood)StoreInfo.GetItemByItemId(vars[0]);
            int         balance     = int.Parse(vars[1]);
            int         amountAdded = int.Parse(vars[2]);

            StoreEvents.OnGoodBalanceChanged(vg, balance, amountAdded);
        }
Esempio n. 4
0
        public void onMarketPurchase(string message)
        {
            Debug.Log("SOOMLA/UNITY onMarketPurchase:" + message);

            string[] vars = Regex.Split(message, "#SOOM#");

            PurchasableVirtualItem pvi = (PurchasableVirtualItem)StoreInfo.GetItemByItemId(vars[0]);
            string payload             = "";
            string purchaseToken       = "";

            if (vars.Length > 1)
            {
                payload = vars[1];
            }
            if (vars.Length > 2)
            {
                purchaseToken = vars[2];
            }

            StoreEvents.OnMarketPurchase(pvi, purchaseToken);
        }
Esempio n. 5
0
 void Awake()
 {
     if(instance == null){ 	// making sure we only initialize one instance.
         instance = this;
         GameObject.DontDestroyOnLoad(this.gameObject);
     } else {				// Destroying unused instances.
         GameObject.Destroy(this.gameObject);
     }
 }
Esempio n. 6
0
        public void onBillingNotSupported(string message)
        {
            StoreUtils.LogDebug(TAG, "SOOMLA/UNITY onBillingNotSupported");

            StoreEvents.OnBillingNotSupported();
        }
Esempio n. 7
0
        public void onIabServiceStopped(string message)
        {
            StoreUtils.LogDebug(TAG, "SOOMLA/UNITY onIabServiceStopped");

            StoreEvents.OnIabServiceStopped();
        }
Esempio n. 8
0
        public void onStoreControllerInitialized(string message)
        {
            StoreUtils.LogDebug(TAG, "SOOMLA/UNITY onStoreControllerInitialized");

            StoreEvents.OnStoreControllerInitialized();
        }
Esempio n. 9
0
        public void onUnexpectedErrorInStore(string message)
        {
            StoreUtils.LogDebug(TAG, "SOOMLA/UNITY onUnexpectedErrorInStore");

            StoreEvents.OnUnexpectedErrorInStore(message);
        }
Esempio n. 10
0
        public void onRestoreTransactionsStarted(string message)
        {
            StoreUtils.LogDebug(TAG, "SOOMLA/UNITY onRestoreTransactionsStarted");

            StoreEvents.OnRestoreTransactionsStarted();
        }
Esempio n. 11
0
        /// <summary>
        /// Handles the <c>onMarketItemsRefreshStarted</c> event, which is fired when items associated with market
        /// refresh process has started.
        /// </summary>
        /// <param name="message">Message that contains information about the <c>market refresh</c> process that
        /// has started.</param>
        public void onMarketItemsRefreshStarted(string message)
        {
            Utils.LogDebug(TAG, "SOOMLA/UNITY onMarketItemsRefreshStarted");

            StoreEvents.OnMarketItemsRefreshStarted();
        }