template<typename T>
class vecs::Optional< T >
Provides an interface for interacting with optional components.
- Template Parameters
-
T | The type of the wrapped value. |
Example usage:
world.spawn().insert(123, 321.f);
for (auto [e, i, maybe_f] : query) {
printf("Entity '%zu' has int component = %i\n", e, i);
if (maybe_f) {
printf("Entity '%zu' has float component = %f\n", e, *maybe_f);
}
}
});
Provides an interface for interacting with optional components.
Definition vecs.h:1088
Represents a query for components within the ECS world.
Definition vecs.h:1270