DialogueLevel constructor
DialogueLevel({
- required Game game,
- required List<
Message> messages, - required void onDone(),
- ScanCode? progressScanCode,
- GameControllerButton? progressControllerButton,
- int position = 0,
- SoundChannel? soundChannel,
- AssetReference? music,
- List<
Ambiance> ? ambiances, - List<
RandomSound> ? randomSounds, - Map<
String, Command> ? commands,
Create an instance.
Implementation
DialogueLevel({
required super.game,
required this.messages,
required this.onDone,
this.progressScanCode,
this.progressControllerButton,
this.position = 0,
this.soundChannel,
super.music,
super.ambiances,
super.randomSounds,
super.commands,
}) : assert(
progressScanCode != null || progressControllerButton != null,
'Both `ProgressControllerButton` and `progressScanCode` cannot be '
'`null`.',
),
assert(
messages.where((final element) => element.keepAlive == false).isEmpty,
'All messages must have their `keepAlive` value set to `true`.',
);