ParallaxComponent<T extends FlameGame> constructor
ParallaxComponent<T extends FlameGame> ({})
Creates a component with an empty parallax which can be set later.
Implementation
ParallaxComponent({
Parallax? parallax,
Vector2? position,
Vector2? size,
Vector2? scale,
double? angle,
Anchor? anchor,
int? priority,
}) : _parallax = parallax,
isFullscreen = size == null && !(parallax?.isSized ?? false),
super(
position: position,
size: size ?? ((parallax?.isSized ?? false) ? parallax?.size : null),
scale: scale,
angle: angle,
anchor: anchor,
priority: priority,
);