public static void DrawWireHexagon(Vector3 position, Hexagon.Orientation orientation, float outerRadius, Color?color = null) { Gizmos.color = color ?? Color.white; Vector2[] points = Hexagon.GetCorners(orientation, outerRadius); for (int i = 0; i < points.Length; ++i) { Gizmos.DrawLine(position + (Vector3)points[i], position + (Vector3)points[(i + 1) % points.Length]); } }
public HexagonMatrix(Hexagon.Orientation orientation) { switch (orientation) { case Hexagon.Orientation.Horizontal: Set(Horizontal.F0, Horizontal.F1, Horizontal.F2, Horizontal.F3, Horizontal.B0, Horizontal.B1, Horizontal.B2, Horizontal.B3, Horizontal.Angle); break; case Hexagon.Orientation.Vertical: Set(Vertical.F0, Vertical.F1, Vertical.F2, Vertical.F3, Vertical.B0, Vertical.B1, Vertical.B2, Vertical.B3, Vertical.Angle); break; } }