mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-10 22:51:30 +08:00
feat!: Add CameraComponent to FlameGame (#2740)
This PR adds the `CameraComponent` and a `World` by default to the FlameGame.
This commit is contained in:
@@ -23,6 +23,6 @@ class Background extends SpriteComponent with HasGameRef<MyGame> {
|
||||
class MyGame extends FlameGame {
|
||||
@override
|
||||
Future<void> onLoad() async {
|
||||
await add(Background());
|
||||
await world.add(Background());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user