protected override void CreateVertices() { Vertices = Hedra.Circle(Center, Radius, vertexCount).ToArray(); for (int i = 0; i < Vertices.Length; i++) { Vertices[i] = Hedra.Rotate(Center, Vertices[i], rotation); } SortVertices(); }
Polygon GetTriangle(Transform transform) { vertices = 3; List <Vector2> circle = Hedra.Circle(transform.position, size, vertices); Polygon polygon = new Triangle(circle[0], circle[1], circle[2]); polygon.Rotation = transform.rotation.eulerAngles.z; polygon.Center = (Vector2)transform.position + center; return(polygon); }