public void InitPanel() { listInfoShopBalls.Clear(); for (int i = 0; i < listBallIDs.Count; i++) { ItemShopBall itemBall = Instantiate <ItemShopBall>(itemShopBallPrefab, ballTranform); itemBall.InitShopBall(Config.GetInfoBallFromID(listBallIDs[i])); itemBall.InitCallBack((ItemShopBall _itemShopBall) => { ItemShopBall_CallBack(_itemShopBall); }); listInfoShopBalls.Add(itemBall); } }
public void ItemShopBall_CallBack(ItemShopBall _itemShopBall) { Debug.Log("ItemShopBall_CallBack:" + _itemShopBall.infoBall.id); premiumPreview.SetInfoBallPreview(Config.GetInfoBallFromID(_itemShopBall.infoBall.id)); }