Beispiel #1
0
        protected override void addItemToContainer(IListItemRender item)
        {
            SASkinItemRender render = item as SASkinItemRender;

            if (render != null)
            {
                GameObject go = render.skin;
                go.transform.SetParent(skin.transform, false);
                go.transform.localScale = Vector3.one;
                //   go.gameObject.SetActive(true);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 重置单项位置
        /// </summary>
        public virtual void resetChildPosition()
        {
            List <IListItemRender> allChild = childrenList;

            for (int i = 0; i < allChild.Count; i++)
            {
                SASkinItemRender render = allChild[i] as SASkinItemRender;
                if (render != null)
                {
                    layout(render, render.index);
                    render.refresh();
                }
            }
        }
Beispiel #3
0
        protected override void layout(IListItemRender item, int i)
        {
            SASkinItemRender render = (SASkinItemRender)item;

            if (render != null)
            {
                GameObject skin = render.skin;
                skin.transform.SetSiblingIndex(i);
                Vector3 temp = skin.transform.localPosition;
                temp.z = temp.x = 0;
                temp.y = getPositionY(i, 0);
                skin.transform.localPosition = temp;
            }
        }