Merge branch 'LevelSystemAndSuch'

Conflicts:
	include/Core/Engine.h
This commit is contained in:
PlatinumSkink
2015-09-15 15:04:40 +02:00
11 changed files with 244 additions and 74 deletions
+5 -2
View File
@@ -81,6 +81,7 @@ public:
m_World->ComponentFactory.Register<Components::Ball>();
m_World->ComponentFactory.Register<Components::Brick>();
m_World->ComponentFactory.Register<Components::Pad>();
m_World->ComponentFactory.Register<Components::Life>();
m_World->SystemFactory.Register<Systems::PhysicsSystem>(
[this]() { return new Systems::PhysicsSystem(m_World.get(), m_EventBroker); });
m_World->AddSystem<Systems::PhysicsSystem>();
@@ -97,6 +98,8 @@ public:
//TODO: Remove tobias light-test code.
/*{
}*/
{
auto ent = m_World->CreateEntity();
@@ -150,8 +153,8 @@ public:
{
auto topWall = m_World->CreateEntity();
std::shared_ptr<Components::Transform> transform = m_World->AddComponent<Components::Transform>(topWall);
transform->Position = glm::vec3(0.f, 5.f, -10.f);
transform->Scale = glm::vec3(15.f, 0.5f, 1.f);
transform->Position = glm::vec3(0.f, 6.f, -10.f);
transform->Scale = glm::vec3(18.f, 0.5f, 1.f);
std::shared_ptr<Components::Sprite> sprite = m_World->AddComponent<Components::Sprite>(topWall);
sprite->SpriteFile = "Textures/Core/ErrorTexture.png";