Scroll to next stage works!

This commit is contained in:
PlatinumSkink
2015-10-07 19:19:55 +02:00
parent 9bb50067fc
commit 07e59bd0e2
6 changed files with 76 additions and 38 deletions
+8 -5
View File
@@ -143,6 +143,7 @@ public:
auto t_Light = m_World->CreateEntity();
auto transform = m_World->AddComponent<Components::Transform>(t_Light);
transform->Position = glm::vec3(-3.f, 6.f, -5.f);
transform->Sticky = true;
auto pl = m_World->AddComponent<Components::PointLight>(t_Light);
pl->Radius = 20.f;
pl->Diffuse = glm::vec3(0.8f, 0.7f, 0.05f);
@@ -154,6 +155,7 @@ public:
auto t_Light = m_World->CreateEntity();
auto transform = m_World->AddComponent<Components::Transform>(t_Light);
transform->Position = glm::vec3(3.f, -5.f, -5.f);
transform->Sticky = true;
auto pl = m_World->AddComponent<Components::PointLight>(t_Light);
pl->Radius = 15.f;
pl->Diffuse = glm::vec3(0.1f, 0.5f, 0.8f);
@@ -171,19 +173,19 @@ public:
transform->Sticky = false;
auto model = m_World->AddComponent<Components::Model>(t_halfPipe);
model->ModelFile = "Models/Test/halfpipe/Halfpipe.obj";
model->Color = glm::vec4(1.f, 0.f, 0.f, 0.3f);
model->Color = glm::vec4(0.8f, 0.8f, 0.8f, 0.3f);
m_World->CommitEntity(t_halfPipe);
}
/*{
{
auto t_halfPipe = m_World->CreateEntity();
auto transform = m_World->AddComponent<Components::Transform>(t_halfPipe);
transform->Position = glm::vec3(0.f, 6.f, -15.f);
transform->Position = glm::vec3(0.f, 34.6f, -15.f);
transform->Scale = glm::vec3(6.f, 6.f, 10.f);
auto model = m_World->AddComponent<Components::Model>(t_halfPipe);
model->ModelFile = "Models/Test/halfpipe/Halfpipe.obj";
model->Color = glm::vec4(1.f, 0.f, 0.f, 0.3f);
model->Color = glm::vec4(0.8f, 0.8f, 0.8f, 0.3f);
m_World->CommitEntity(t_halfPipe);
}*/
}
//Background
{
@@ -240,6 +242,7 @@ public:
auto transform = m_World->AddComponent<Components::Transform>(t_waterBody);
transform->Position = glm::vec3(0.f, -5.5f, -10.f);
transform->Scale = glm::vec3(7.f, 1.5f, 1.f);
transform->Sticky = true;
auto water = m_World->AddComponent<Components::WaterVolume>(t_waterBody);
auto body = m_World->AddComponent<Components::RectangleShape>(t_waterBody);
m_World->CommitEntity(t_waterBody);
+5 -1
View File
@@ -9,14 +9,18 @@
namespace dd
{
namespace Events
{
struct StageCleared : Event
{
int StageCleared = 0;
int ClearedStage = 0;
int StageCluster = 0;
};
}
}
#endif //DAYDREAM_ESTAGECLEARED_H
+2 -2
View File
@@ -66,8 +66,8 @@ public:
void Initialize() override;
void CreateBasicLevel(int, int, glm::vec2, float);
void CreateLevel();
void CreateBrick(int, int, glm::vec2, float, int, int);
void CreateLevel(int);
void CreateBrick(int, int, glm::vec2, float, int, int, int);
void OnEntityRemoved(EntityID entity);
+20 -10
View File
@@ -9,27 +9,33 @@
#include "Core/World.h"
#include "Core/EventBroker.h"
#include "Core/CTemplate.h"
#include "Core/CTransform.h"
#include "Core/CTemplate.h"
#include "Physics/EContact.h"
#include "Physics/ESetImpulse.h"
#include "Physics/CRectangleShape.h"
#include "Physics/CCircleShape.h"
#include "Physics/CPhysics.h"
#include "Physics/CWaterVolume.h"
#include "Core/CTransform.h"
#include "Transform/TransformSystem.h"
#include "CRectangleShape.h"
#include "Physics/CPhysics.h"
#include "Physics/EContact.h"
#include "Physics/ESetImpulse.h"
#include "Physics/CParticle.h"
#include "Physics/CCircleShape.h"
#include "Physics/CParticleEmitter.h"
#include "Game/CPad.h"
#include "Game/CPad.h"
#include "Game/CBall.h"
#include "Transform/TransformSystem.h"
#include "Rendering/CSprite.h"
#include "Core/CTemplate.h"
#include "Transform/TransformSystem.h"
#include "CRectangleShape.h"
#include "Game/EStageCleared.h"
#include "Game/EPause.h"
#include "Game/CPad.h"
#include "Game/CBrick.h"
#include "Game/CBall.h"
#include "Rendering/CSprite.h"
namespace dd
{
@@ -95,6 +101,10 @@ namespace dd
bool SetImpulse(const Events::SetImpulse &event);
dd::EventRelay<PhysicsSystem, dd::Events::Pause> m_EPause;
bool OnPause(const dd::Events::Pause &event);
dd::EventRelay<PhysicsSystem, dd::Events::StageCleared> m_EStageCleared;
bool OnStageCleared(const dd::Events::StageCleared &event);
bool m_Travelling = false;
float m_Timer = 0;
//TODO: Fill struct with info needed.
struct ParticleEmitter