Rework ECS framework

- Add queue systems when adding/removing components and systems
- Add GlobalData to ECSManager, used to store data that is not specific
  to entities
- Add View class, used to for loop all entities that contains the given
  Components
- Rework how signaling works
This commit is contained in:
Thraix
2026-02-07 18:25:13 +01:00
parent e5866b2dcb
commit 9d5a5314a7
23 changed files with 729 additions and 245 deletions
+7 -2
View File
@@ -40,7 +40,7 @@ namespace Copium
return id != entity.id;
}
Entity::operator bool() const
bool Entity::IsValid() const
{
if (id == INVALID_ENTITY)
return false;
@@ -49,6 +49,11 @@ namespace Copium
return false;
}
Entity::operator bool() const
{
return IsValid();
}
void Entity::Invalidate()
{
id = INVALID_ENTITY;
@@ -79,4 +84,4 @@ namespace Copium
{
return {manager, manager->CreateEntity()};
}
}
}