static private Snap ( List |
||
sourceEdges | List |
|
edgesToSnapAgainst | List |
|
activeEdges | SnapEdge>.List | |
리턴 | Vector2 |
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[] array = new float[] { num, num }; float[] array2 = new float[2]; foreach (SnapEdge current in sourceEdges) { int num2 = current.EdgeCoordinateIndex(); SnapEdge.Snap(current, edgesToSnapAgainst, ref array[num2], ref array2[num2], activeEdges[num2]); } zero.x = array2[0]; zero.y = array2[1]; return(zero); }
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); }