private void AddPanel(BuyMenuItemProperties properties)
        {
            var item = Instantiate(itemAsset, itemsPanel.transform);

            item.Initialize(properties);

            var rectTransform = item.GetComponent <RectTransform>();

            rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, _currentY);



            _currentY -= (int)rectTransform.rect.height;
            _currentY -= 10;
        }
Example #2
0
 public void Initialize(BuyMenuItemProperties properties)
 {
     _properties = properties;
 }