예제 #1
0
    public List <int> Maopao_New(List <int> oris, W_SortMode mode = W_SortMode.升序)
    {
        List <int> tars = U_List.CopyList(oris);

        if (mode == W_SortMode.升序)
        {
            for (int i = 0; i < tars.Count - 1; i++)
            {
                for (int j = 0; j < tars.Count - 1 - i; j++)
                {
                    if (tars[j] > tars[j + 1])
                    {
                        U_Exchange.ExchangeFromList(ref tars, j);
                    }
                }
            }
        }
        else
        {
            for (int i = 0; i < tars.Count - 1; i++)
            {
                for (int j = 0; j < tars.Count - 1 - i; j++)
                {
                    if (tars[j] < tars[j + 1])
                    {
                        U_Exchange.ExchangeFromList(ref tars, j);
                    }
                }
            }
        }
        return(tars);
    }
예제 #2
0
 void SetNowTrans_Pre(int groupIndex)
 {
     if (null == movingTrans)
     {
         movingTrans = new List <Transform>();
     }
     if (state == General_State.一步拆ing || state == General_State.一步装ing)
     {
         U_List.ClearList(movingTrans);
     }
     else
     {
         movingTrans = U_List.CopyList(oriGroupList[groupIndex]);
     }
 }