animation property

SpriteAnimation? animation

Returns the current SpriteAnimation.

Implementation

SpriteAnimation? get animation => _animationTicker?.spriteAnimation;
void animation=(SpriteAnimation? value)

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();
  }
}