Skip to content

Commit

Permalink
feat: Allow to pass a camera to Forge2D Game (#1364)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev-Owl committed Feb 11, 2022
1 parent c924328 commit 9890e9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/flame_forge2d/lib/forge2d_game.dart
Expand Up @@ -15,9 +15,10 @@ class Forge2DGame extends FlameGame {
Forge2DGame({
Vector2? gravity,
double zoom = defaultZoom,
Camera? camera,
}) : world = World(gravity ?? defaultGravity),
super(camera: Forge2DCamera()) {
camera.zoom = zoom;
super(camera: camera ?? Forge2DCamera()) {
this.camera.zoom = zoom;
world.setContactListener(_contactCallbacks);
}

Expand Down

0 comments on commit 9890e9c

Please sign in to comment.