From 376ff346946162192bbeca65db56b38589d77e35 Mon Sep 17 00:00:00 2001 From: tleety Date: Tue, 15 Sep 2015 14:59:48 +0200 Subject: [PATCH] Merged into master and uncommented ball --- include/Core/Engine.h | 50 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 26 deletions(-) mode change 100644 => 100755 include/Core/Engine.h diff --git a/include/Core/Engine.h b/include/Core/Engine.h old mode 100644 new mode 100755 index 7637939..fd10962 --- a/include/Core/Engine.h +++ b/include/Core/Engine.h @@ -98,34 +98,32 @@ public: //TODO: Remove tobias light-test code. + { + auto ent = m_World->CreateEntity(); + std::shared_ptr transform = m_World->AddComponent(ent); + transform->Position = glm::vec3(0.5f, 0.f, -9.9f); + transform->Scale = glm::vec3(1.f, 1.f, 1.f); + std::shared_ptr sprite = m_World->AddComponent(ent); + sprite->SpriteFile = "Textures/Ball.png"; -// { -// auto ent = m_World->CreateEntity(); -// std::shared_ptr transform = m_World->AddComponent(ent); -// transform->Position = glm::vec3(0.5f, 0.f, -9.9f); -// transform->Scale = glm::vec3(1.f, 1.f, 1.f); -// -// std::shared_ptr sprite = m_World->AddComponent(ent); -// sprite->SpriteFile = "Textures/Ball.png"; -// -// std::shared_ptr circleShape = m_World->AddComponent(ent); -// std::shared_ptr ball = m_World->AddComponent(ent); -// -// std::shared_ptr physics = m_World->AddComponent(ent); -// physics->Static = false; -// -// auto plight = m_World->AddComponent(ent); -// plight->Radius = 2.f; -// -// m_World->CommitEntity(ent); -// -// Events::SetImpulse e; -// e.Entity = ent; -// e.Impulse = glm::vec2(0.f, -7.f); -// e.Point = glm::vec2(0.5f, 0.f); -// m_EventBroker->Publish(e); -// } + std::shared_ptr circleShape = m_World->AddComponent(ent); + std::shared_ptr ball = m_World->AddComponent(ent); + + std::shared_ptr physics = m_World->AddComponent(ent); + physics->Static = false; + + auto plight = m_World->AddComponent(ent); + plight->Radius = 2.f; + + m_World->CommitEntity(ent); + + Events::SetImpulse e; + e.Entity = ent; + e.Impulse = glm::vec2(0.f, -7.f); + e.Point = glm::vec2(0.5f, 0.f); + m_EventBroker->Publish(e); + } { auto t_BrickWall = m_World->CreateEntity();