animation property
SpriteAnimation?
get
animation
inherited
Returns the current SpriteAnimation
.
Implementation
SpriteAnimation? get animation => _animationTicker?.spriteAnimation;
set
animation
(SpriteAnimation? value)
inherited
Sets the given value
as current animation
.
Implementation
set animation(SpriteAnimation? value) {
if (animation != value) {
if (value != null) {
_animationTicker = value.createTicker();
} else {
_animationTicker = null;
}
_resizeToSprite();
}
}