Example #1
0
 //For GridLayout
 public void InitGrid(int id, int showNum, int horizontalItemNum, int verticalItemNum, GridLoopList.SepConfig config, GridLoopList.LoopType type)
 {
     _id                = -1;
     _content           = transform.parent.SafeGetComponent <RectTransform>();
     mode               = BaseElementMode.Grid;
     _showNum           = showNum;
     _horizontalItemNum = horizontalItemNum;
     _verticalItemNum   = verticalItemNum;
     _gridSepConfig     = config;
     _gridLoopType      = type;
     ChangeID(id);
 }
Example #2
0
 //General Method
 public void Init(int id, float offset, int showNum, LoopList.SepConfig config, LoopList.LayoutType type, List <object> paramList = null)
 {
     _id            = -1;
     _content       = transform.parent.SafeGetComponent <RectTransform>();
     mode           = BaseElementMode.Normal;
     _offset        = offset;
     _showNum       = showNum;
     _sepConfig     = config;
     _layoutType    = type;
     this.paramList = paramList;
     ChangeID(id);
 }