DialogueLevel class

A level that shows a series of Message instances to the player, allowing them to skip between them.

Inheritance

Constructors

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.

Properties

ambiancePlaybacks Map<Ambiance, SoundPlayback>
The playback settings for the list of ambiances.
finalinherited
ambiances List<Ambiance>
A list of ambiances for this level.
finalinherited
commandNextRuns List<NextRun<Command>>
The times before commands should run next.
finalinherited
commands Map<String, Command>
The commands this level recognises.
finalinherited
game Game
The game this level is part of.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
messages List<Message>
The list of messages to progress through.
final
music AssetReference?
The music for this level.
finalinherited
musicSound Sound?
The playing music.
getter/setter pairinherited
onDone → void Function()
The function that will be called when the messages list has been exhausted.
final
position int
The current position in the messages list.
getter/setter pair
progressControllerButton → GameControllerButton?
The game controller button that lets the player progress through the messages list.
final
progressScanCode → ScanCode?
The scancode that allows progressing through the messages list.
final
random Random
The game's random sound generator.
no setterinherited
randomSoundNextPlays List<NextRun<RandomSound>>
The times that randomSounds should play next.
finalinherited
randomSoundPlaybacks Map<RandomSound, SoundPlayback>
The playback settings for the list of randomSounds.
finalinherited
randomSounds List<RandomSound>
All the random sounds on this level.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sound Sound?
The currently-playing sound.
no setter
soundChannel SoundChannel?
The sound channel to output sounds through.
final
stoppedCommands List<NextRun<Command>>
The old command next runs.
finalinherited

Methods

getCommandNextRun(Command command) NextRun<Command>?
Get the next run value for the given command.
inherited
getRandomSoundNextPlay(RandomSound randomSound) NextRun<RandomSound>
Get the next run for the given randomSound.
inherited
handleSdlEvent(Event event) → void
Handle an SDL event.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCover(Level other) → void
What should happen when this level is covered by another level.
inherited
onPop(double? fadeLength) → void
What should happen when this level is popped from a level stack.
override
onPush({double? fadeLength}) → void
What should happen when this level is pushed into a level stack.
override
onReveal(Level old) → void
What should happen when this level is revealed by another level being popped from on top of it.
inherited
progress() → void
Progress through the list of messages.
registerCommand(String name, Command command) → void
Register a command on this level.
inherited
runCommand(Command command) → void
Run the given command.
inherited
scheduleRandomSound(RandomSound sound) → void
Schedule a random sound to play.
inherited
startCommand(String name) bool
Start the command with the given name.
inherited
stopCommand(String name) bool
Stop the command with the given name.
inherited
stopCommands(int timeDelta) → void
Remove any commands from the stoppedCommands list that can now be ran again.
inherited
stopPlayback(SoundPlayback playback) → void
Stop playback.
inherited
tick(int timeDelta) → void
Let this level tick.
inherited
tickCommands(int timeDelta) → void
Tick all commandNextRuns.
inherited
tickRandomSounds(int timeDelta) → void
Tick all random sounds.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited