Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::ecs::PluginContext Class Reference

What a plugin can add to the game, given to its start function. More...

#include <aegis2d/ecs/plugins.hpp>

Public Member Functions

 PluginContext (Scheduler &systems) noexcept
 A context adding to the game's systems.
 
Scheduler & systems () const noexcept
 The game's systems: the plugin adds its own, e.g. systems().add("drift", ...).
 
void add_asset_folder (std::filesystem::path folder)
 Adds a folder of assets the plugin brings, which the game loads like its own.
 
const std::vector< std::filesystem::path > & asset_folders () const noexcept
 Folders of assets the plugins brought, in the order they were added.
 

Detailed Description

What a plugin can add to the game, given to its start function.

Constructor & Destructor Documentation

◆ PluginContext()

aegis2d::ecs::PluginContext::PluginContext ( Scheduler &  systems)
inlineexplicitnoexcept

A context adding to the game's systems.

Parameters
systemsThe game's systems; must outlive the context.

Member Function Documentation

◆ add_asset_folder()

void aegis2d::ecs::PluginContext::add_asset_folder ( std::filesystem::path  folder)
inline

Adds a folder of assets the plugin brings, which the game loads like its own.

Parameters
folderFolder of the assets.

◆ asset_folders()

const std::vector< std::filesystem::path > & aegis2d::ecs::PluginContext::asset_folders ( ) const
inlinenoexcept

Folders of assets the plugins brought, in the order they were added.

Returns
The folders.

◆ systems()

Scheduler & aegis2d::ecs::PluginContext::systems ( ) const
inlinenoexcept

The game's systems: the plugin adds its own, e.g. systems().add("drift", ...).

Returns
The game's scheduler.

The documentation for this class was generated from the following file: