EntityFileParser

This commit is contained in:
2016-01-07 13:10:44 +01:00
parent 0bcbcda8b8
commit 03456ad731
5 changed files with 153 additions and 36 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ public:
{
m_EntityFile = ResourceManager::Load<EntityFile>(path);
EntityFileHandler handler;
handler.SetStartComponentCallback(std::bind(&EntityFilePreprocessor::onStartComponent, this, std::placeholders::_1));
handler.SetStartComponentCallback(std::bind(&EntityFilePreprocessor::onStartComponent, this, std::placeholders::_1, std::placeholders::_2));
m_EntityFile->Parse(&handler);
LOG_DEBUG("___ COMPONENT DEFINITIONS ___");
@@ -57,7 +57,7 @@ private:
std::map<std::string, unsigned int> m_ComponentCounts;
std::map<std::string, ComponentInfo> m_ComponentInfo;
void onStartComponent(std::string type)
void onStartComponent(EntityID entity, std::string type)
{
//LOG_DEBUG("Component: %s", type.c_str());
m_ComponentCounts[type]++;