registry:

* public and runtime pools
* removed basic_registry<...>::prepare
This commit is contained in:
Michele Caini
2021-11-22 18:38:52 +01:00
parent 8d1ba26492
commit adfdbf138d
4 changed files with 106 additions and 70 deletions

View File

@@ -8,7 +8,8 @@ CR_EXPORT int cr_main(cr_plugin *ctx, cr_op operation) {
// forces things to break
auto &registry = *static_cast<entt::registry *>(ctx->userdata);
registry.prepare<velocity>();
// forces the creation of the pool for the velocity component
registry.storage<velocity>();
const auto view = registry.view<position>();
registry.insert(view.begin(), view.end(), velocity{1., 1.});