SceneLevel class
A level that plays a cutscene.
Constructors
-
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.
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
- duration → int?
-
The number of milliseconds to run this scene for.
final
- game → Game
-
The game this level is part of.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → Message
-
The message to play.
final
- music → AssetReference?
-
The music for this level.
finalinherited
- musicSound ↔ Sound?
-
The playing music.
getter/setter pairinherited
- onDone → void Function()
-
The callback to be run when the scene has finished.
final
- onDoneTask ↔ Task?
-
The task which will call onDone.
getter/setter pair
- 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
- skipControllerButton → GameControllerButton?
-
The game controller button that will prematurely end this scene.
final
- skipScanCode → ScanCode?
-
The scancode that will prematurely end this scene.
final
- sound → Sound?
-
The currently-playing sound.
no setter
- soundChannel → SoundChannel?
-
The sound channel to play the message sound 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
-
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 -
skip(
) → void - Skip this scene.
-
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