CircleHitbox.relative constructor
CircleHitbox.relative(})
With this constructor you define the CircleHitbox in relation to the
parentSize
. For example having a relation
of 0.5 would create a circle
that fills half of the parentSize
.
Implementation
CircleHitbox.relative(
super.relation, {
required super.parentSize,
super.position,
super.angle,
super.anchor,
bool isSolid = false,
CollisionType collisionType = CollisionType.active,
}) : shouldFillParent = false,
super.relative() {
this.isSolid = isSolid;
this.collisionType = collisionType;
}