SceneLevel class
A level for showing a scene.
Constructors
- SceneLevel({required WorldContext worldContext, required Scene scene, CallCommand? callCommand, int index = 0})
- 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
- callCommand → CallCommand?
-
The command to run when all the SceneSections have been shown.
final
-
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
- index ↔ int
-
The current index in the scene sections.
getter/setter pair
- music → Music?
-
The music for this level.
finalinherited
- musicSound ↔ PlaySound?
-
The playing
music.getter/setter pairinherited -
randomSoundNextPlays
→ List<
NextRun< RandomSound> > -
The times that
randomSoundsshould 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
- scene → Scene
-
The scene to show.
final
- sound ↔ PlaySound?
-
The currently-playing sound.
getter/setter pair
-
stoppedCommands
→ List<
NextRun< Command> > -
The old command next runs.
finalinherited
- worldContext → WorldContext
-
The world context to use.
final
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.
inherited
-
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 - Destroy everything.
-
onPush(
) → void - Show the next section.
-
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
soundto play.inherited -
showNextSection(
) → void - Show the next section.
-
startCommand(
String name) → bool -
Start the command with the given
name.inherited -
stopCommand(
String name) → bool -
Stop the command with the given
name.inherited -
stopPlayback(
SoundPlayback playback) → void -
Stop
playback.inherited -
tick(
Sdl sdl, int timeDelta) → void -
Let this level tick.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited