setWorldSize method

void setWorldSize(
  1. double width,
  2. double height
)

Implementation

void setWorldSize(double width, double height) {
  gameWidth = width;
  gameHeight = height;
  worldBounds =
      Rect.fromLTRB(-gameWidth / 2.0, -gameHeight / 2.0, gameWidth / 2.0, gameHeight / 2.0);
}