Example #1
0
 private void OnUpgradeAdded(UpgradeData data)
 {
     if (data.CurrencyType == currencyType)
     {
         itemList.UpdateViews(DataSource);
     }
 }
Example #2
0
        public void Setup(ProductListViewData viewData)
        {
            this.viewData = viewData;

            foreach (Transform trs in layout)
            {
                if (trs && trs.gameObject)
                {
                    Destroy(trs.gameObject);
                }
            }

            viewList.Clear();
            viewList.Setup(productViewPrefab, layout, (prod, view) => view.Setup(prod), (p1, p2) => p1.id == p2.id, CompareProducts, Services);
            viewList.UpdateViews(viewData.Products);
            Debug.Log($"load products => {viewData.ProductType}, count => {viewData.Products.Count}");
        }