Description
This PR adds the CameraComponent and a World by default to the FlameGame.
Checklist
I have followed the Contributor Guide when preparing my PR.
I have updated/added tests for ALL new/updated/fixed functionality.
I have updated/added relevant documentation in docs and added dartdoc comments with ///.
I have updated/added relevant examples in examples or docs.
Breaking Change?
Yes, this PR is a breaking change.
Migration instructions
We'll treat this as a breaking change since the cameraComponent name will clash with many of our users implementations, luckily it is very easy to migrate.
If you have a game like this currently:
class MyGame extends FlameGame {
late final CameraComponent cameraComponent;
late final World world;
Future<void> onLoad() async {
world = World()
cameraComponent = CameraComponent(world: world);
add(world);
add(cameraComponent);
world.add(MyComponent());
}
}
then you simply have to remove your own references to cameraComponent and world, s
wono
|
Do you want to delete?