public static CAchievementCell CreateAchievementCell() { if (mObj == null) { mObj = Resources.Load("pbAchievementCell"); } if (mObj != null) { GameObject go = Instantiate(mObj) as GameObject; CAchievementCell ac = go.GetComponent <CAchievementCell>(); return(ac); } return(null); }
public WGTableViewCell WGTableViewCellWithIndex(WGTableView scrView, int index) { WGTableViewCell cell = scrView.getCacheCellsWithIdentifier(1); CAchievementCell tCell; if (cell == null) { tCell = CAchievementCell.CreateAchievementCell(); cell = tCell as WGTableViewCell; cell.identifier = 1; tCell.curAchViewManager = this; } else { tCell = cell as CAchievementCell; } tCell.index = index; MDAchievement ach; if (index < szReached.Count) { ach = szReached[index]; } else if (index < szReached.Count + szNoReached.Count) { ach = szNoReached[index - szReached.Count]; } else { ach = szHaveGot[index - szReached.Count - szNoReached.Count]; } tCell.freshUIWithData(ach); return(cell); }