Files
axyz/include/Engine/Core/World.h
T
2015-12-02 15:07:48 +01:00

33 lines
518 B
C++

#ifndef World_h__
#define World_h__
#include "../Common.h"
#include "Entity.h"
#include "ComponentPool.h"
class World
{
public:
World()
{
}
~World()
{
// foreach (m_ComponentPools...
}
void AllocateComponentPool(ComponentInfo& ci)
{
auto pool = new ComponentPool(ci);
m_ComponentPools[ci.Name] = pool;
}
void AddComponent(EntityID entity, std::string componentType);
private:
std::unordered_map<std::string, ComponentPool*> m_ComponentPools;
};
#endif