Level.fromStub constructor

Level.fromStub(
  1. Game game,
  2. LevelStub stub, {
  3. Map<String, Command>? commands,
})

Create an instance from a level stub.

Implementation

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