SpriteAnimationRender constructor
SpriteAnimationRender({
- SpriteAnimation? animation,
- Vector2? size,
- Vector2? position,
- VoidCallback? onFinish,
- VoidCallback? onStart,
- bool loop = true,
- bool autoPlay = true,
Implementation
SpriteAnimationRender({
SpriteAnimation? animation,
this.size,
this.position,
this.onFinish,
this.onStart,
this.loop = true,
bool autoPlay = true,
}) : _animation = animation {
_animation?.loop = loop;
_animationTicker = animation?.createTicker();
_animationTicker?.onStart = onStart;
_animationTicker?.onComplete = onFinish;
_animationTicker?.paused = !autoPlay;
}