Adding Animation#paint

This commit is contained in:
Erick Zanardo
2020-04-01 21:36:29 -03:00
parent e19f87046c
commit 2c705ebcee
2 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import 'package:flame/animation.dart';
class AnimationComponent extends PositionComponent {
Animation animation;
Paint paint;
bool destroyOnFinish = false;
AnimationComponent(double width, double height, this.animation,
@ -53,7 +54,7 @@ class AnimationComponent extends PositionComponent {
@override
void render(Canvas canvas) {
prepareCanvas(canvas);
animation.getSprite().render(canvas, width: width, height: height);
animation.getSprite().render(canvas, width: width, height: height, overridePaint: paint);
}
@override