public PointShopSingleGoodsItem CreateShopSingleGoodsItem(Transform container) { GameObject newItem = singleShopGoodsItemRes.InstanceMainRes(); PointShopSingleGoodsItem result = null; if (newItem) { result = newItem.GetComponent <PointShopSingleGoodsItem>(); if (result) { result.Init(container as RectTransform); } else { singleShopGoodsItemRes.DestroyInstanceRes(ref newItem); } } return(result); }
public override bool Init(IUIWnd wnd) { base.Init(wnd); shopGoodsItem = LogicDataCenter.pointShopDataManager.CreateShopSingleGoodsItem(shopGoodsFrame); if (shopGoodsItem == null) { return(false); } titleText.text = ULocalizationService.Instance.Get("UIView", "PointShopBuyGoods", "TitleText"); curPointDesc.text = ULocalizationService.Instance.Get("UIView", "PointShopBuyGoods", "CurPointDesc"); needPointDesc.text = ULocalizationService.Instance.Get("UIView", "PointShopBuyGoods", "NeedPointDesc"); leftPointDesc.text = ULocalizationService.Instance.Get("UIView", "PointShopBuyGoods", "LeftPointDesc"); pointBuyBtnText.text = ULocalizationService.Instance.Get("UIView", "PointShopBuyGoods", "PointBuyBtn"); curMoneyDesc.text = ULocalizationService.Instance.Get("UIView", "PointShopBuyGoods", "CurMoneyDesc"); needMoneyDesc.text = ULocalizationService.Instance.Get("UIView", "PointShopBuyGoods", "NeedMoneyDesc"); leftMoneyDesc.text = ULocalizationService.Instance.Get("UIView", "PointShopBuyGoods", "LeftMoneyDesc"); moneyBuyBtnText.text = ULocalizationService.Instance.Get("UIView", "PointShopBuyGoods", "MoneyBuyBtn"); return(true); }