mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
refactor: Remove Loadable, optional onLoads (#1333)
This commit is contained in:
@ -14,7 +14,6 @@ class SpritebatchLoadExample extends FlameGame {
|
||||
|
||||
@override
|
||||
Future<void> onLoad() async {
|
||||
await super.onLoad();
|
||||
add(MySpriteBatchComponent());
|
||||
}
|
||||
}
|
||||
@ -23,7 +22,6 @@ class MySpriteBatchComponent extends SpriteBatchComponent
|
||||
with HasGameRef<SpritebatchLoadExample> {
|
||||
@override
|
||||
Future<void> onLoad() async {
|
||||
await super.onLoad();
|
||||
final spriteBatch = await gameRef.loadSpriteBatch('boom.png');
|
||||
this.spriteBatch = spriteBatch;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user