getAnimation method

SpriteAnimation getAnimation({
  1. required Vector2 size,
  2. required int amount,
  3. Vector2? position,
  4. double stepTime = 0.1,
  5. bool loop = true,
})

Implementation

SpriteAnimation getAnimation({
  required Vector2 size,
  required int amount,
  Vector2? position,
  double stepTime = 0.1,
  bool loop = true,
}) {
  return SpriteAnimation.fromFrameData(
    this,
    SpriteAnimationData.sequenced(
      amount: amount,
      stepTime: stepTime,
      textureSize: size,
      loop: loop,
      texturePosition: position,
    ),
  );
}