mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
32 lines
546 B
Dart
32 lines
546 B
Dart
import 'dart:ui';
|
|
|
|
import '../sprite_batch.dart';
|
|
import 'component.dart';
|
|
|
|
class SpriteBatchComponent extends Component {
|
|
final SpriteBatch spriteBatch;
|
|
BlendMode blendMode;
|
|
Rect cullRect;
|
|
Paint paint;
|
|
|
|
SpriteBatchComponent.fromSpriteBatch(
|
|
this.spriteBatch, {
|
|
this.blendMode,
|
|
this.cullRect,
|
|
this.paint,
|
|
});
|
|
|
|
@override
|
|
void render(Canvas canvas) {
|
|
spriteBatch.render(
|
|
canvas,
|
|
blendMode: blendMode,
|
|
cullRect: cullRect,
|
|
paint: paint,
|
|
);
|
|
}
|
|
|
|
@override
|
|
void update(double t) {}
|
|
}
|