Scene<T extends App<T>> constructor

Scene<T extends App<T>>(
  1. T app, {
  2. String? key,
  3. bool populateDefaults = true,
})

Creates a new scene bound to app.

Automatically registers a TransformSyncSystem and emits EventSceneInitialized.

Implementation

Scene(this.app, {
  String? key,
  bool populateDefaults = true,
}) {
  this.populateDefaults = populateDefaults;
  this.key = key ?? namedId;
  if (populateDefaults) {
    addSystem(TransformSyncSystem(app));
  }
  emit(EventSceneInitialized(app, this));
}