Merge remote-tracking branch 'origin/master' into particles
Conflicts: src/Components/Physics.h src/GameWorld.cpp src/World.cpp src/World.h vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
+9
-10
@@ -119,16 +119,6 @@ EntityID World::CreateEntity(EntityID parent /*= 0*/)
|
||||
return newEntity;
|
||||
}
|
||||
|
||||
World::~World()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
World::World()
|
||||
{
|
||||
m_LastEntityID = 0;
|
||||
}
|
||||
|
||||
void World::Initialize()
|
||||
{
|
||||
RegisterSystems();
|
||||
@@ -147,6 +137,15 @@ std::shared_ptr<Component> World::AddComponent(EntityID entity, std::string comp
|
||||
return AddComponent<Component>(entity, componentType);
|
||||
}
|
||||
|
||||
void World::CommitEntity(EntityID entity)
|
||||
{
|
||||
for (auto pair : m_Systems)
|
||||
{
|
||||
auto system = pair.second;
|
||||
system->OnEntityCommit(entity);
|
||||
}
|
||||
}
|
||||
|
||||
void World::AddComponent(EntityID entity, std::string componentType, std::shared_ptr<Component> component)
|
||||
{
|
||||
component->Entity = entity;
|
||||
|
||||
Reference in New Issue
Block a user