Files
flame/examples/lib/commons/ember.dart
Lukas Klingsbo 9c1e1c3098 chore: Remove deprecations for v1.9.0 (#2749)
Removes everything that was marked as deprecated and that should be
removed for v1.9.0.
2023-09-19 16:47:41 +02:00

26 lines
653 B
Dart

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