fix: Fix SpriteBatch to comply with new drawAtlas requirement (#3338)

Fix SpriteBatch to comply with new drawAtlas requirement

Fixes: #3331
This commit is contained in:
Luan Nico
2024-10-13 12:09:29 -04:00
committed by GitHub
parent 0041604a89
commit a17fe4cdfa
6 changed files with 98 additions and 9 deletions

View File

@ -20,6 +20,11 @@ class SpriteBatchLoadExample extends FlameGame {
class MySpriteBatchComponent extends SpriteBatchComponent
with HasGameReference<SpriteBatchLoadExample> {
MySpriteBatchComponent()
: super(
blendMode: BlendMode.srcOver,
);
@override
Future<void> onLoad() async {
final spriteBatch = await game.loadSpriteBatch('boom.png');