public void ActivateButton() { if (CustomShopItem) { CustomShopItem.Activate(); } else if (UIButton != null) { UIButton.OnSubmit(null); } }
private void CheckShopPrices(ShopItem item) { if (item.isUnlocked) { if (item.itemCost <= TotalGold) { //Debug.Log("item.name: " + item.name); item.Activate(); } else { item.Deactivate(); } } }
private void CheckShopPrices() { for (int i = 0; i < shopItemsArray.Length; i++) { ShopItem item = shopItemsArray[i]; if (item.isUnlocked) { if (item.itemCost <= TotalGold) { item.Activate(); } else { item.Deactivate(); } } } }