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 {
await super.onLoad();
final center = screenToWorld(camera.viewport.canvasSize! / 2);
await add(
ChromeDino()..initialPosition = center,
);
camera.followVector2(Vector2.zero());
await add(ChromeDino());
}
}

Loading…
Cancel
Save