7#include <aegis2d/ecs/export.hpp>
33 asset_folders_.push_back(std::move(folder));
38 [[nodiscard]]
const std::vector<std::filesystem::path>&
asset_folders() const noexcept {
39 return asset_folders_;
44 std::vector<std::filesystem::path> asset_folders_;
48inline constexpr std::string_view
plugin_start =
"aegis2d_plugin_start";
109 [[nodiscard]]
std::
size_t size() const noexcept {
return plugins_.size(); }
112 std::vector<core::EngineLibrary> plugins_;
What a plugin can add to the game, given to its start function.
Definition plugins.hpp:20
void add_asset_folder(std::filesystem::path folder)
Adds a folder of assets the plugin brings, which the game loads like its own.
Definition plugins.hpp:32
const std::vector< std::filesystem::path > & asset_folders() const noexcept
Folders of assets the plugins brought, in the order they were added.
Definition plugins.hpp:38
Scheduler & systems() const noexcept
The game's systems: the plugin adds its own, e.g. systems().add("drift", ...).
Definition plugins.hpp:28
PluginContext(Scheduler &systems) noexcept
A context adding to the game's systems.
Definition plugins.hpp:24
The plugins a game loaded, kept loaded as long as it lives.
Definition plugins.hpp:77
Plugins & operator=(const Plugins &)=delete
Plugins(Plugins &&) noexcept=default
Plugins(const Plugins &)=delete
Ordered list of named systems, all updated once per tick.
Definition system.hpp:100
Entity-Component-System used by client and server.
Definition animation.hpp:13
constexpr std::string_view plugin_start
Name of the C function a plugin exports, called once when it is loaded.
Definition plugins.hpp:48
Definition endpoint.hpp:85
Shared libraries loaded at run time, and the C entry point that tells an Aegis2D library and its vers...
Systems and the scheduler that updates them in order, once per tick.