mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 03:15:43 +08:00
Adding Animation#paint
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user