PolygonComponent constructor
PolygonComponent({})
The normalizedVertices
should be a list of points that range between
-1.0, 1.0
which defines the relation of the vertices in the polygon
from the center of the component to the size of the component.
Implementation
PolygonComponent({
required List<Vector2> normalizedVertices,
Paint? paint,
Vector2? position,
Vector2? size,
Vector2? scale,
double? angle,
Anchor? anchor,
int? priority,
}) : super(
HitboxPolygon(normalizedVertices),
paint: paint,
position: position,
size: size,
scale: scale,
angle: angle,
anchor: anchor,
priority: priority,
);