Exemple #1
0
        void DepthSort()
        {
            var st = new SortTool <BaseUnit>();

            foreach (var ub in _unitList)
            {
                st.AddItem((int)(ub.SortValue * 100), ub);
            }
            var sortList = st.Sort(true);

            for (int i = 0; i < sortList.Length; i++)
            {
                sortList[i].SetSortValue(i);
            }
        }