setAnimation method
void
setAnimation(
- SpriteAnimation? animation, {
- Vector2? size,
- bool loop = true,
- bool autoPlay = true,
- VoidCallback? onFinish,
- VoidCallback? onStart,
set Animation that will be drawn on the screen.
Implementation
void setAnimation(
SpriteAnimation? animation, {
Vector2? size,
bool loop = true,
bool autoPlay = true,
VoidCallback? onFinish,
VoidCallback? onStart,
}) {
_animationRender = SpriteAnimationRender(
animation: animation,
size: size ?? this.size,
loop: loop,
onFinish: onFinish,
onStart: onStart,
autoPlay: autoPlay,
);
}