public EnhancedScrollerCellView GetCellView(EnhancedScroller scroller, int dataIndex, int cellIndex) { BallItemCellView ballItemCellView = scroller.GetCellView(m_CellViewPrefab) as BallItemCellView; ballItemCellView.SetData(m_Data[dataIndex]); return(ballItemCellView); }
// 新規セルビュー追加時デリゲート private void CellViewInstantiated(EnhancedScroller scroller, EnhancedScrollerCellView cellView) { BallItemCellView ballItemCell = cellView as BallItemCellView; if (ballItemCell == null) { return; } List <UIPart> parts = new List <UIPart> { new BallItemButtonPart(ballItemCell, ballItemCell.textButton), new BallItemButtonPart(ballItemCell, ballItemCell.fixedIntegerButton), new BallItemButtonPart(ballItemCell, ballItemCell.dataIntegerButton) }; // 即時追加 UIController.Instance.AttachParts(TargetLayer, parts); }
public BallItemPart(BallItemCellView ballItemCellView) : base(ballItemCellView.transform) { m_BallItemCellView = ballItemCellView; }
public BallItemButtonPart(BallItemCellView ballItemCellView, GameObject buttonObject) : base(buttonObject.transform) { m_BallItemCellView = ballItemCellView; }