SceneController constructor

SceneController({
  1. GSprite? back,
  2. GSprite? front,
  3. SceneConfig? config,
})

The SceneController constructor.

The optional back and front arguments specify the background and foreground GSprite objects, respectively. The optional config argument specifies the configuration for this SceneController.

Implementation

SceneController({
  GSprite? back,
  GSprite? front,
  SceneConfig? config,
}) {
  assert(back != null || front != null);
  if (back != null) {
    backScene = ScenePainter(this, back);
  }
  if (front != null) {
    frontScene = ScenePainter(this, front);
  }
  this.config = config ?? SceneConfig.defaultConfig;
}