(World) Renamed internal method Mark(All)AsDirty
To Invalidate Former-commit-id: 62e62d82258227d652711c3933a816845a076e53
This commit is contained in:
parent
ebc651dec8
commit
a1280a6af3
|
|
@ -58,8 +58,8 @@ namespace Ndk
|
||||||
void Update();
|
void Update();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void MarkAllAsDirty();
|
void Invalidate();
|
||||||
void MarkAsDirty(EntityId id);
|
void Invalidate(EntityId id);
|
||||||
|
|
||||||
struct EntityBlock
|
struct EntityBlock
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ namespace Ndk
|
||||||
m_systems[index] = std::move(system);
|
m_systems[index] = std::move(system);
|
||||||
m_systems[index]->SetWorld(*this);
|
m_systems[index]->SetWorld(*this);
|
||||||
|
|
||||||
MarkAllAsDirty(); // On force une mise à jour de toutes les entités
|
Invalidate(); // On force une mise à jour de toutes les entités
|
||||||
|
|
||||||
return *m_systems[index].get();
|
return *m_systems[index].get();
|
||||||
}
|
}
|
||||||
|
|
@ -124,13 +124,13 @@ namespace Ndk
|
||||||
RemoveSystem(index);
|
RemoveSystem(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void World::MarkAllAsDirty()
|
inline void World::Invalidate()
|
||||||
{
|
{
|
||||||
m_dirtyEntities.Resize(m_entities.size(), false);
|
m_dirtyEntities.Resize(m_entities.size(), false);
|
||||||
m_dirtyEntities.Set(true); // Activation de tous les bits
|
m_dirtyEntities.Set(true); // Activation de tous les bits
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void World::MarkAsDirty(EntityId id)
|
inline void World::Invalidate(EntityId id)
|
||||||
{
|
{
|
||||||
m_dirtyEntities.UnboundedSet(id, true);
|
m_dirtyEntities.UnboundedSet(id, true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace Ndk
|
||||||
m_componentBits.UnboundedSet(index);
|
m_componentBits.UnboundedSet(index);
|
||||||
|
|
||||||
// On informe le monde que nous avons besoin d'une mise à jour
|
// On informe le monde que nous avons besoin d'une mise à jour
|
||||||
m_world->MarkAsDirty(m_id);
|
m_world->Invalidate(m_id);
|
||||||
|
|
||||||
return *m_components[index].get();
|
return *m_components[index].get();
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +64,7 @@ namespace Ndk
|
||||||
m_componentBits.Clear();
|
m_componentBits.Clear();
|
||||||
|
|
||||||
// On informe le monde que nous avons besoin d'une mise à jour
|
// On informe le monde que nous avons besoin d'une mise à jour
|
||||||
m_world->MarkAsDirty(m_id);
|
m_world->Invalidate(m_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entity::RemoveComponent(ComponentIndex index)
|
void Entity::RemoveComponent(ComponentIndex index)
|
||||||
|
|
@ -76,7 +76,7 @@ namespace Ndk
|
||||||
m_componentBits.Reset(index);
|
m_componentBits.Reset(index);
|
||||||
|
|
||||||
// On informe le monde que nous avons besoin d'une mise à jour
|
// On informe le monde que nous avons besoin d'une mise à jour
|
||||||
m_world->MarkAsDirty(m_id);
|
m_world->Invalidate(m_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue