ice.level
Handles execution of a single game level.
- class LevelInitException: object.Exception;
Thrown when the level fails to initialize.
- abstract class Level;
Handles execution of a single game level.
Note that it is expected to explicitly destroy the Level using clear() once it is not used anymore.
- protected const string name_;
Name of the level (used for debugging).
- protected GameSubsystems subsystems_;
Provides access to game subsystems (such as EntitySystem, VideoDriver, etc.).
- pure nothrow this(string name, GameSubsystems subsystems);
Construct a Level.
Parameters:string name Name of the level. GameSubsystems subsystems Provides access to game subsystems (e.g. EntitySystem to spawn entities). - bool update();
Update the level state, executing level script.
This might spawn new enemies, display text, etc.
Returns:true if the level is still running, false if the level has been finished.
- class DumbLevel: ice.level.Level;
Level implementation based on a dumb YAML script.
Described in more detail in modding documentation.
- this(string levelName, Node yaml, GameSubsystems gameSybsystems, Node playerSpawnerSource);
Construct a DumbLevel.
Parameters:Throws:string levelName Name of the level (used for debugging). Node yaml YAML source of the level. subsystems Provides access to game subsystems (e.g. EntitySystem to spawn entities). Node playerSpawnerSource YAML source of an entity to spawn the player ship. LevelInitException on failure.