Line | Branch | Exec | Source |
---|---|---|---|
1 | #include "ECS/World.hpp" | ||
2 | |||
3 | namespace ECS { | ||
4 | 8 | EntityID World::CreateEntity() { | |
5 | 8 | return m_entityManager.CreateEntity(); | |
6 | } | ||
7 | |||
8 | 1 | void World::DestroyEntity(EntityID entity) { | |
9 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | if (IsEntityAlive(entity)) { |
10 | 1 | m_componentManager.RemoveAllComponents(entity); | |
11 | 1 | m_entityManager.DestroyEntity(entity); | |
12 | } | ||
13 | 1 | } | |
14 | |||
15 | 3 | bool World::IsEntityAlive(EntityID entity) const { | |
16 | 3 | return m_entityManager.IsEntityAlive(entity); | |
17 | } | ||
18 | |||
19 | ✗ | void World::Clear() { | |
20 | ✗ | m_componentManager.Clear(); | |
21 | ✗ | m_entityManager.Clear(); | |
22 | ✗ | } | |
23 | |||
24 | 1 | size_t World::GetAliveEntityCount() const { | |
25 | 1 | return m_entityManager.GetAliveEntityCount(); | |
26 | } | ||
27 | } | ||
28 |