BodyComponent<T extends Forge2DGame<Forge2DWorld>> constructor

BodyComponent<T extends Forge2DGame<Forge2DWorld>>({
  1. Paint? paint,
  2. Iterable<Component>? children,
  3. int? priority,
  4. bool renderBody = true,
  5. BodyDef? bodyDef,
  6. List<FixtureDef>? fixtureDefs,
  7. ComponentKey? key,
})

Implementation

BodyComponent({
  Paint? paint,
  super.children,
  super.priority,
  this.renderBody = true,
  this.bodyDef,
  this.fixtureDefs,
  super.key,
}) {
  this.paint = paint ?? (Paint()..color = defaultColor);
}