private void InitBuyCoffee() { foreach (var item in GameManager.IapManager.GoodItems) { if (item.RewardItemName == typeof(Adrenaline).Name) { _goodItem = item; break; } } CoffeePriceLabel.text = _goodItem.Price.ToString(); }
public void Init(GameManager gameManager, IapGoodItem iapItem, ShopView shop) { base.Init(gameManager); IapItem = iapItem; _item = BaseObjectFactory.GetItem(IapItem.RewardItemName); _shop = shop; NameLabel.text = Localization.Get(IapItem.LocalizedTitle); IconSprite.spriteName = _item.IconName; PriceLabel.text = IapItem.Price.ToString(); AmountLabel.text = "x" + IapItem.RewardAmount; UIEventListener.Get(BuyButton).onClick += OnBuyClick; }