Beispiel #1
0
        /// <summary>
        /// 添加一个节点到头部
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public DoubleLinkedListNode <T> AddToHeader(T t)
        {
            DoubleLinkedListNode <T> pList = m_DoubleLinkNodePool.Allocate();

            pList.next = null;
            pList.prev = null;
            pList.t    = t;
            return(AddToHeader(pList));
        }
Beispiel #2
0
        private RectTransform GetNewItem(int index)
        {
            RectTransform item;

            if (itemGetFunc != null)
            {
                item = itemGetFunc(index);
            }
            else
            {
                item = itemPool.Allocate();
            }
            return(item);
        }