Exemplo n.º 1
0
        public void onStoreControllerInitialized()
        {
            ExampleLocalStoreInfo.Init();

            // some usage examples for add/remove currency
            // some examples
            if (ExampleLocalStoreInfo.VirtualCurrencies.Count > 0)
            {
                try {
                    StoreInventory.GiveItem(ExampleLocalStoreInfo.VirtualCurrencies [0].ItemId, 4000);
                    StoreUtils.LogDebug("SOOMLA ExampleEventHandler", "Currency balance:" + StoreInventory.GetItemBalance(ExampleLocalStoreInfo.VirtualCurrencies [0].ItemId));
                } catch (VirtualItemNotFoundException ex) {
                    StoreUtils.LogError("SOOMLA ExampleEventHandler", ex.Message);
                }
            }
        }
Exemplo n.º 2
0
 public void onGoodBalanceChanged(VirtualGood good, int balance, int amountAdded)
 {
     ExampleLocalStoreInfo.UpdateBalances();
 }
Exemplo n.º 3
0
 public void onCurrencyBalanceChanged(VirtualCurrency virtualCurrency, int balance, int amountAdded)
 {
     ExampleLocalStoreInfo.UpdateBalances();
 }