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:
Stiffly
2014-05-12 13:55:48 +02:00
60 changed files with 2404 additions and 340 deletions
+9 -10
View File
@@ -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;