Example #1
0
        private void InitBuyCoffee()
        {
            foreach (var item in GameManager.IapManager.GoodItems)
            {
                if (item.RewardItemName == typeof(Adrenaline).Name)
                {
                    _goodItem = item;
                    break;
                }
            }

            CoffeePriceLabel.text = _goodItem.Price.ToString();
        }
Example #2
0
        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;
        }