private void RegenerateShopGoodsItems() { TransformUtil.ClearChildren(otherShopItemsRoot, true); List <ShopGoodsItemInfo> shopGoodsItemInfoList = ShopProxy.instance.ShopGoodsItemInfoDic.GetValues(); int shopGoodsItemInfoCount = shopGoodsItemInfoList.Count; for (int i = 0; i < shopGoodsItemInfoCount; i++) { ShopItemView shopItemView = GameObject.Instantiate <ShopItemView>(shopItemViewPrefab); shopItemView.SetShopGoodItemInfo(shopGoodsItemInfoList[i]); shopItemView.transform.SetParent(otherShopItemsRoot, false); shopItemView.gameObject.SetActive(true); } }
private void RegenerateShopHeroRandomItems() { TransformUtil.ClearChildren(heroRandomShopItemsRoot, true); List <ShopHeroRandomCardInfo> shopHeroRandomCardInfoList = ShopProxy.instance.ShopHeroRandomCardInfoDic.GetValues(); int shopHeroRandomCardInfoCount = shopHeroRandomCardInfoList.Count; ShopHeroRandomCardInfo shopHeroRandomCardInfo = null; for (int i = 0; i < shopHeroRandomCardInfoCount; i++) { shopHeroRandomCardInfo = shopHeroRandomCardInfoList[i]; ShopItemView shopItemView = GameObject.Instantiate <ShopItemView>(shopItemViewPrefab); shopItemView.SetShopHeroRandomCardInfo(shopHeroRandomCardInfo); shopItemView.name = shopHeroRandomCardInfo.ShopCardRandomData.id.ToString(); shopItemView.transform.SetParent(heroRandomShopItemsRoot, false); shopItemView.gameObject.SetActive(true); } }