RectangleHitbox constructor

RectangleHitbox({
  1. Vector2? position,
  2. Vector2? size,
  3. double? angle,
  4. Anchor? anchor,
  5. int? priority,
  6. bool isSolid = false,
  7. CollisionType collisionType = CollisionType.active,
})

Implementation

RectangleHitbox({
  super.position,
  super.size,
  super.angle,
  super.anchor,
  super.priority,
  bool isSolid = false,
  CollisionType collisionType = CollisionType.active,
}) : shouldFillParent = size == null && position == null {
  this.isSolid = isSolid;
  this.collisionType = collisionType;
}