SceneController constructor
SceneController({
- GSprite? back,
- GSprite? front,
- 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;
}