SceneLevel constructor
SceneLevel({
- required Game game,
- required Message message,
- required void onDone(),
- int? duration,
- ScanCode? skipScanCode,
- GameControllerButton? skipControllerButton,
- SoundChannel? soundChannel,
- AssetReference? music,
- List<
Ambiance> ? ambiances, - List<
RandomSound> ? randomSounds, - Map<
String, Command> ? commands,
Create an instance.
Both ambiances
and randomSounds
will be passed to the Level
constructor.
Implementation
SceneLevel({
required super.game,
required this.message,
required this.onDone,
this.duration,
this.skipScanCode,
this.skipControllerButton,
this.soundChannel,
super.music,
super.ambiances,
super.randomSounds,
super.commands,
}) : assert(
duration != null ||
skipControllerButton != null ||
skipScanCode != null,
'At least one of `duration`, `skipControllerButton`, or '
'`skipScanCode` must not be null.',
),
assert(
message.keepAlive == true,
'If `keepAlive` is not `true`, then `onPop` will not function '
'properly.',
);