public static CShopScrollCell CreateShopScrollCell() { if (mObj == null) { mObj = Resources.Load("shopcell"); } GameObject go = Instantiate(mObj) as GameObject; CShopScrollCell ci = go.GetComponent <CShopScrollCell>(); return(ci); }
public WGTableViewCell WGTableViewCellWithIndex(WGTableView scrView, int index) { WGTableViewCell cell = scrView.getCacheCellsWithIdentifier(mIdentifier); CShopScrollCell tCell; if (cell == null) { tCell = CShopScrollCell.CreateShopScrollCell(); cell = tCell as WGTableViewCell; cell.identifier = mIdentifier; } else { tCell = cell as CShopScrollCell; } tCell.index = index; tCell.freshShopItem(index, szShopData[index]); return(cell); }
// 刷新当前在视图内能展示的Cell 需要调用SQYScrollView.UpdataCells()函数 public void UpdateShowTableViewCells(WGTableViewCell aCell, int index) { CShopScrollCell tCell = aCell as CShopScrollCell; tCell.freshShopItem(index, szShopData[index]); }