public void ComprarUpgrade(Upgrade p) { Mejora item = new Mejora(); item = p.storeItem; if (SM.CanPurcheaseItem(item)) { SM.BuyItem(item); bc.goldCounterA = SM.billetera.dineroJugador[0]; bc.goldCounterB = SM.billetera.dineroJugador[1]; p.Click(); } }
public void Purchase(CocoStoreID id, Action <BuyItemResult> doneAction = null) { var itemData = StoreConfigData.GetItemData(id); if (itemData == null) { if (doneAction != null) { doneAction(new BuyItemResult(BuyItemResultCode.Error)); } return; } if (!IsBillingAvailable) { if (doneAction != null) { doneAction(new BuyItemResult(BuyItemResultCode.Error)); } // CocoMainController.ShowNoInternetPopup (); return; } StoreManager.BuyItem(itemData.Key).Done(result => OnPurchaseDone(itemData, result, doneAction)); }
public void PointerDown() { if (!StoreManager.ItemsSold[(int)item]) { if (CoinController.AmountOfCoins >= price) { storeManager.BuyItem(item, price); GetComponentInChildren <Text>().text = item.ToString() + " SOLD"; } else { GetComponentInChildren <Text>().text = "NO COINS!"; } } }