import 'package:flame/components.dart'; import 'package:flame/game.dart'; import 'package:meta/meta.dart'; class Ember extends SpriteAnimationComponent with HasGameReference { Ember({super.position, Vector2? size, super.priority, super.key}) : super( size: size ?? Vector2.all(50), anchor: Anchor.center, ); @mustCallSuper @override Future onLoad() async { animation = await game.loadSpriteAnimation( 'flame_benchmark/sprite_benchmark/ember.png', SpriteAnimationData.sequenced( amount: 3, textureSize: Vector2.all(16), stepTime: 0.15, ), ); } }