refactor: adjusted centering

pull/139/head
alestiago 4 years ago
parent 370275488b
commit d40fcbe76f

@ -10,9 +10,7 @@ class ChromeDinoGame extends Forge2DGame {
Future<void> onLoad() async { Future<void> onLoad() async {
await super.onLoad(); await super.onLoad();
final center = screenToWorld(camera.viewport.canvasSize! / 2); camera.followVector2(Vector2.zero());
await add( await add(ChromeDino());
ChromeDino()..initialPosition = center,
);
} }
} }

Loading…
Cancel
Save