Merge remote-tracking branch 'origin/master' into Physics

This commit is contained in:
viktorljung
2015-09-23 15:14:16 +02:00
25 changed files with 2834 additions and 6 deletions
+13 -1
View File
@@ -18,6 +18,7 @@
#include <string>
#include <sstream>
#include <Sound/CCollisionSound.h>
#include "ResourceManager.h"
#include "OBJ.h"
@@ -36,6 +37,8 @@
#include "CTemplate.h"
#include "Rendering/CPointLight.h"
#include "Transform/TransformSystem.h"
#include "Sound/SoundSystem.h"
#include "Sound/CCollisionSound.h"
#include "Game/LevelSystem.h"
#include "Game/PadSystem.h"
#include "Game/CBall.h"
@@ -65,13 +68,21 @@ public:
m_InputManager = std::make_shared<InputManager>(m_Renderer->Window(), m_EventBroker);
m_World = std::make_shared<World>(m_EventBroker);
m_World = std::make_shared<World>(m_EventBroker);
//TODO: Move this out of engine.h
m_World->ComponentFactory.Register<Components::Transform>();
m_World->SystemFactory.Register<Systems::TransformSystem>(
[this]() { return new Systems::TransformSystem(m_World.get(), m_EventBroker); });
m_World->AddSystem<Systems::TransformSystem>();
m_World->ComponentFactory.Register<Components::Model>();
m_World->ComponentFactory.Register<Components::Template>();
m_World->ComponentFactory.Register<Components::CollisionSound>();
m_World->SystemFactory.Register<Systems::SoundSystem>([this]() { return new Systems::SoundSystem(m_World.get(), m_EventBroker); });
m_World->AddSystem<Systems::SoundSystem>();
m_World->ComponentFactory.Register<Components::Sprite>();
@@ -410,6 +421,7 @@ private:
std::shared_ptr<InputManager> m_InputManager;
std::shared_ptr<World> m_World;
double m_LastTime;
};
-1
View File
@@ -248,7 +248,6 @@ protected:
EntityID GenerateEntityID();
void RecycleEntityID(EntityID id);
};
template <class T>