Level constructor

Level({
  1. required Game game,
  2. Map<String, Command>? commands,
  3. AssetReference? music,
  4. List<Ambiance>? ambiances,
  5. List<RandomSound>? randomSounds,
})

Create a level.

Implementation

Level({
  required this.game,
  final Map<String, Command>? commands,
  this.music,
  final List<Ambiance>? ambiances,
  final List<RandomSound>? randomSounds,
})  : commands = commands ?? {},
      commandNextRuns = [],
      stoppedCommands = [],
      ambiances = ambiances ?? [],
      randomSounds = randomSounds ?? [],
      ambiancePlaybacks = {},
      randomSoundPlaybacks = {},
      randomSoundNextPlays = [];