diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt index 6d4797e..61c2d74 100755 --- a/src/game/CMakeLists.txt +++ b/src/game/CMakeLists.txt @@ -75,7 +75,7 @@ set(SOURCE_FILES ${SOURCE_FILES_Rendering} ${SOURCE_FILES_Transform} ${SOURCE_FILES_Physics} - ${SOURCE_FILES_Game} ../../include/Game/CLife.h ../../include/Game/ELifeLost.h ../../include/Game/EResetBall.h ../../include/Game/EScoreEvent.h) + ${SOURCE_FILES_Game}) if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") diff --git a/src/game/Game/PadSystem.cpp b/src/game/Game/PadSystem.cpp index 542b877..5f1aa61 100755 --- a/src/game/Game/PadSystem.cpp +++ b/src/game/Game/PadSystem.cpp @@ -41,15 +41,27 @@ void dd::Systems::PadSystem::UpdateEntity(double dt, EntityID entity, EntityID p transformEntity->Position = glm::vec3(20, 20, -10); //Temporary. Create new ball. - auto ent = m_World->CreateEntity(); + /*auto ent = m_World->CreateEntity(); std::shared_ptr transform = m_World->AddComponent(ent); - transform->Position = glm::vec3(0.5f, 0.f, -10.f);; + transform->Position = glm::vec3(0.5f, 0.f, -10.f); 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 cball = m_World->AddComponent(ent); std::shared_ptr physics = m_World->AddComponent(ent); + physics->Static = false;*/ + + auto ent = m_World->CreateEntity(); + std::shared_ptr transform = m_World->AddComponent(ent); + transform->Position = glm::vec3(0.5f, 0.f, -10.f); + transform->Scale = glm::vec3(1.f, 1.f, 1.f); + auto model = m_World->AddComponent(ent); + model->ModelFile = "Models/Test/Ball/Ballopus.obj"; + //auto pointlight = m_World->AddComponent(ent); + std::shared_ptr circleShape = m_World->AddComponent(ent); + std::shared_ptr cball = m_World->AddComponent(ent); + std::shared_ptr physics = m_World->AddComponent(ent); physics->Static = false; m_World->RemoveEntity(entity);