vecs
Fast, flexible ecs in C++ with ergonomic API
|
A collection of components grouped together as a single bundle. More...
#include <bundle.h>
Public Member Functions | |
constexpr | Bundle (Components &&... components) |
Constructs a Bundle with the given components. | |
Public Attributes | |
std::tuple< Components... > | components |
A tuple holding the components in the bundle. | |
A collection of components grouped together as a single bundle.
The Bundle
struct allows multiple components to be grouped and inserted into entities in a single operation, simplifying entity initialization and reducing repetitive code. Bundles are useful for defining default component configurations, such as commonly used entity setups.
Components | The types of components in the bundle. |
|
inlineconstexpr |
Constructs a Bundle
with the given components.
components | The components to include in the bundle, which are forwarded to the tuple. |
Example usage: