public static void Build(D2dEdgeCollider.Cell cell, D2dEdgeCollider edgeCollider) { D2dCache.CachedList <Vector2> .Clear(); for (var i = 0; i < activeSquares.Count; i++) { var square = activeSquares[i]; if (square.Mask != 0) { var collider = edgeCollider.AddCollider(); collider.points = Trace(square, edgeCollider.Optimize); cell.Colliders.Add(collider); } } }
public static void Build(D2dEdgeCollider.Cell cell, D2dEdgeCollider edgeCollider) { D2dCache.CachedList <Vector2> .Clear(); for (var i = 0; i < activeSquares.Count; i++) { square = activeSquares[i]; if (square.Mask != 0) { squareIndex = square.Index; var collider = edgeCollider.AddCollider(); collider.points = Trace(edgeCollider.Straighten); cell.Colliders.Add(collider); } } }