From 1589b3417526645cd968af70da8cc449f15b8f71 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Tue, 2 Jun 2015 01:12:06 +0200 Subject: [PATCH] Green light around power-ups --- Escape-the-Dawn/Systems/LevelGenerationSystem.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp b/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp index 81b327c..b134bb2 100644 --- a/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp +++ b/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp @@ -83,6 +83,17 @@ void Systems::LevelGenerationSystem::SpawnObstacle() powerUp->Duration = 5.f; model->ModelFile = "Models/powerup.obj"; + + auto lightEnt = m_World->CreateEntity(ent); + transform = m_World->AddComponent(lightEnt, "Transform"); + transform->Position = glm::vec3(0.0f, 2.0f, 2.5f); + auto light = m_World->AddComponent(lightEnt, "PointLight"); + light->Specular = glm::vec3(0.1f, 0.1f, 0.1f); + light->Diffuse = glm::vec3(0.05f, 0.36f, 1.f); + light->constantAttenuation = 0.f; + light->linearAttenuation = 1.0f; + light->quadraticAttenuation = 0.f; + light->spotExponent = 0.0f; } // Put it below ground level