ice.game
Game class.
- class GameStartException: object.Exception;
Thrown when the game fails to start.
- struct GameSubsystems;
Provided by Game to allow access its subsystems.
Passed to classes that need access to many game subsystems but shouldn't be able to e.g. update the game state.
- pure nothrow @property GameGUI gui();
Get a reference to the game GUI.
- pure nothrow @property VideoDriver videoDriver();
Get a reference to the video driver used to draw the game.
- const pure nothrow @property const(GameTime) gameTime();
Get a const reference to the game time subsystem.
- pure nothrow @property VFSDir gameDir();
Get the game data directory.
- pure nothrow @property GraphicsEffectManager effectManager();
Get a reference to the graphics effect manager.
- pure nothrow @property SoundSystem sound();
- const nothrow @property Rectf gameArea();
Get the game area.
- pure nothrow @property EntitySystem entitySystem();
Get a reference to the entity system (e.g. to add new entities).
- struct GameOverData;
Stores various data about the end of a game.
- class Game;
Class managing a single game in a level.
- class GameContainer;
Container managing dependencies and construction of Game.
- this(GUISystem guiSystem, SoundSystem sound);
Produce a GameContainer with dependencies that never change between game instances.
Parameters:GUISystem guiSystem A reference to the GUI system. SoundSystem sound A reference to the sound system. - Game produce(Platform platform, MonitorManager monitor, GUISwapper guiSwapper, VideoDriver videoDriver, VFSDir gameDir, ResourceManager!(Node) yamlManager, PlayerProfile profile, ref YAMLNode levelSource);
Produce a Game and return a reference to it.
Parameters:Returns:Platform platform Platform to use for user input. MonitorManager monitor MonitorManager to monitor game subsystems. GUISwapper guiSwapper A reference to the GUI swapper. VideoDriver videoDriver Video driver to draw graphics with. VFSDir gameDir Game data directory. PlayerProfile profile Profile of the current player. YAMLNode levelSource YAML source of the level to load. Produced Game.Throws:GameStartException if the game fails to start.- void destroy();
Destroy the contained Game.