コード例 #1
0
        public void FormatPos(BaseOrder order = null)
        {
            m_order_list.Sort();
            Vector3   temp_pos;
            BaseOrder temp_order;

            for (int idx = 0; idx < m_order_list.Count; idx++)
            {
                temp_pos   = CaculPos(idx);
                temp_order = m_order_list[idx];
                if (order == temp_order || temp_order.holderPos == temp_pos || Vector3.Distance(temp_pos, temp_order.transform.localPosition) <= 1)
                {
                    continue;
                }
                temp_order.holderPos = temp_pos;
                MoveOrder(temp_order, temp_pos);
            }
            var rect = transform as RectTransform;

            if (rect.sizeDelta.y != contentHeight)
            {
                rect.sizeDelta = new Vector2(rect.sizeDelta.x, contentHeight);
            }
        }
コード例 #2
0
 private void MoveOrder(BaseOrder order, Vector3 pos)
 {
     order.transform.DOLocalMove(pos, (float)0.3).onComplete = () => { order.holderPos = BADPOS; };
 }
コード例 #3
0
        public void PreInsert(BaseOrder obj_base_order)
        {
            obj_base_order.gameObject.transform.SetParent(transform);

            m_order_list.Add(obj_base_order);
        }