animation property
set
animation
(SpriteAnimation? animation)
Implementation
set animation(SpriteAnimation? animation) {
_animation = animation;
_animation?.loop = loop;
_animationTicker = animation?.createTicker();
_animationTicker?.onStart = onStart;
_animationTicker?.onComplete = onFinish;
}