entity per world

This commit is contained in:
Patedam committed 2026-10-16 21:33:57 -04:00
1 parent 16ba641d8a
commit b70e2d21d2
15 files changed
+694 -19

No files matched your search

+3 -1
View File
@@ -18,6 +18,7 @@ struct typed_entity_array
struct EntityManager
{
static EntityID ID;
uint64 next_local_counter = 1ULL;
// TODO: Should be a pool
VectorArena<Entity, 100'000> Entities;
@@ -31,4 +32,5 @@ EntityManager& GetEntityManager();
EntityTemplate* RegisterEntity(EntityManager& manager, Entity* base, DerivedType entity);
[[nodiscard]] Entity* allocate_entity(EntityManager& manager, NonNullPtr<const Class> derived_type_class);
void UpdateEntityManager(EntityManager& manager);
[[nodisacrd]] Entity* deserialize_entity(Archive& archive, EntityManager& manager);
[[nodiscard]] Entity* deserialize_entity(Archive& archive, EntityManager& manager);
void update_local_counter(EntityManager& manager, EntityID entity_id);