GameDecorationWithCollision.withSprite constructor
GameDecorationWithCollision.withSprite(})
Implementation
GameDecorationWithCollision.withSprite(
Future<Sprite> sprite,
Vector2 position, {
double width = 32,
double height = 32,
Iterable<CollisionArea>? collisions,
double offsetX = 0,
double offsetY = 0,
this.aboveComponents = false,
}) : super.withSprite(
sprite,
position: position,
height: height,
width: width,
) {
if (collisions != null) {
setupCollision(
CollisionConfig(collisions: collisions),
);
}
}