This commit is contained in:
Michele Caini
2018-10-29 22:57:07 +01:00
parent 274b8181d1
commit ce4e335412
2 changed files with 3 additions and 2 deletions

1
TODO
View File

@@ -18,4 +18,3 @@
* signals on entity creation/destruction
* flexible views with "composable" filters
* review persistent views and avoid indirection to get components
* registry::create(it_from, it_end) to create N instances at once

View File

@@ -272,7 +272,9 @@ auto &[pos, vel] = registry.get<position, velocity>(entity);
```
The `get` member function template gives direct access to the component of an
entity stored in the underlying data structures of the registry.
entity stored in the underlying data structures of the registry. There exists
also an alternative member function named `get_if` that returns a pointer to the
component owned by an entity if any, a null pointer otherwise.
## Observe changes