コード例 #1
0
ファイル: NSortableList.cs プロジェクト: chadiik/PCG-MCT
    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);
    }
コード例 #2
0
ファイル: NSortableList.cs プロジェクト: chadiik/PCG-MCT
 public static int SortRandom(INSortItem a, INSortItem b)
 {
     return(( int )(Rand.Instance.Float() * 4f - 2f));
 }