Beispiel #1
0
    public static int SortBySortingValue(INSortItem a, INSortItem b)
    {
        float d = a.SortingValue - b.SortingValue;

        if (d < 0)
        {
            return(-1);
        }
        if (d > 0)
        {
            return(1);
        }
        return(0);
    }
Beispiel #2
0
 public static int SortRandom(INSortItem a, INSortItem b)
 {
     return(( int )(Rand.Instance.Float() * 4f - 2f));
 }