Ejemplo n.º 1
0
        public static void onCurrencyBalanceChanged(CurrencyBalanceChangedEvent _Event, bool alsoPush)
        {
            SoomlaWpStore.domain.virtualCurrencies.VirtualCurrency currency = _Event.GetCurrency();
            int balance     = _Event.GetBalance();
            int amountAdded = _Event.GetAmountAdded();

            SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onCurrencyBalanceChanged" + currency.getItemId() + " " + balance.ToString() + " " + amountAdded.ToString());

            VirtualCurrency vc = (VirtualCurrency)StoreInfo.GetItemByItemId(currency.getItemId());

            StoreEvents.OnCurrencyBalanceChanged(vc, balance, amountAdded);

            StoreInventory.RefreshOnCurrencyBalanceChanged(vc, balance, amountAdded);

            //Why this line was added twice ??
            //StoreEvents.OnCurrencyBalanceChanged(vc, balance, amountAdded);

            if (alsoPush)
            {
                sep.PushEventOnCurrencyBalanceChanged(_Event);
            }
        }
Ejemplo n.º 2
0
 public VirtualCurrency(SoomlaWpStore.domain.virtualCurrencies.VirtualCurrency wpVirtualCurrency)
     : base(wpVirtualCurrency)
 {
 }