SpriteAnimationComponent.fromFrameData constructor
SpriteAnimationComponent.fromFrameData(})
Creates a SpriteAnimationComponent from a size
, an image
and data
.
Check SpriteAnimationData for more info on the available options.
Optionally removeOnFinish
can be set to true to have this component be
auto removed from the FlameGame when the animation is finished.
Implementation
SpriteAnimationComponent.fromFrameData(
Image image,
SpriteAnimationData data, {
bool? autoResize,
bool removeOnFinish = false,
bool playing = true,
Paint? paint,
Vector2? position,
Vector2? size,
Vector2? scale,
double? angle,
double nativeAngle = 0,
Anchor? anchor,
Iterable<Component>? children,
int? priority,
ComponentKey? key,
}) : this(
animation: SpriteAnimation.fromFrameData(image, data),
autoResize: autoResize,
removeOnFinish: removeOnFinish,
playing: playing,
paint: paint,
position: position,
size: size,
scale: scale,
angle: angle,
nativeAngle: nativeAngle,
anchor: anchor,
children: children,
priority: priority,
key: key,
);