public EquidistanceRecycle(UIScrollView sv, int dataCount, int size, int dataColum, OnLoadItem loadItem, OnUpdateItem updateItem, int extraShownum = 1) { mScrollView = sv; DataCount = dataCount; cellSize = size; halfCellSize = (float)cellSize / 2; mDataColumnLimit = dataColum; onLoadItem = loadItem; onUpdateItem = updateItem; extraShowNum = extraShownum; InitNeed(); }
/// <summary> /// UIRecycleTable唯一入口 /// </summary> /// <param name="pScrollView"></param> /// <param name="pOnLoadItem">加载item</param> /// <param name="pOnUpdateItem">更新item</param> /// <param name="pOnDeleteItem">删除item</param> /// <param name="pGetPrefabType">当有多种Prefab类型的时候必须绑定该委托,然后在ItemController初始化时为IRecycleTable接口中的prefabType赋值</param> public UIRecycleTable(UIScrollView pScrollView, OnLoadItem pOnLoadItem, OnUpdateItem pOnUpdateItem, OnDeleteItem pOnDeleteItem, GetPrefabType pGetPrefabType) { if (pScrollView == null) { return; } scrollView = pScrollView; panel = scrollView.panel; scrollViewTrans = scrollView.transform; onLoadItem = pOnLoadItem; onUpdateItem = pOnUpdateItem; onDeleteItem = pOnDeleteItem; getPrefabType = pGetPrefabType; Init(); }
public EquidistancePageRecycle(UIScrollView sv, int dataCount, int size, int pageColum, OnLoadItem loadItem, OnUpdateItem updateItem, UIGrid.Arrangement arrangement = UIGrid.Arrangement.Horizontal, bool isNeedFirstLastLimit = true, int extraShownum = 1, int minDragCanMoveDistance = 0, bool isNeedFirstLastLimitRecycle = true) { mScrollView = sv; DataCount = dataCount; cellSize = size; halfCellSize = (float)cellSize / 2; pageColumnLimit = pageColum; extraShowNum = extraShownum; onLoadItem = loadItem; onUpdateItem = updateItem; DataArrangeType = arrangement; minDragMoveDistance = minDragCanMoveDistance; IsNeedFirstLastLimit = isNeedFirstLastLimit; IsNeedFirstLastLimitRecycle = isNeedFirstLastLimitRecycle; InitNeed(); }