EdgeCoordinateIndex() private method

private EdgeCoordinateIndex ( ) : int
return int
Esempio n. 1
0
        internal static Vector2 Snap(List <SnapEdge> sourceEdges, List <SnapEdge> edgesToSnapAgainst, List <KeyValuePair <SnapEdge, SnapEdge> >[] activeEdges)
        {
            Vector2 zero = Vector2.zero;
            float   num  = 10f;

            activeEdges[0].Clear();
            activeEdges[1].Clear();
            float[] numArray1 = new float[2] {
                num, num
            };
            float[] numArray2 = new float[2];
            using (List <SnapEdge> .Enumerator enumerator = sourceEdges.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SnapEdge current = enumerator.Current;
                    int      index   = current.EdgeCoordinateIndex();
                    SnapEdge.Snap(current, edgesToSnapAgainst, ref numArray1[index], ref numArray2[index], activeEdges[index]);
                }
            }
            zero.x = numArray2[0];
            zero.y = numArray2[1];
            return(zero);
        }