Added ScoreEvent, added score to bricks. Stage resets after all bricks are destroyed.

This commit is contained in:
PlatinumSkink
2015-09-15 17:25:47 +02:00
parent b340cf97bb
commit c2d29b6110
14 changed files with 132 additions and 43 deletions
+6
View File
@@ -15,6 +15,8 @@
#include "Game/CLife.h"
#include "Game/EStageCleared.h"
#include "Game/ELifeLost.h"
#include "Game/EResetBall.h"
#include "Game/EScoreEvent.h"
#include "Physics/CBoxShape.h"
#include "Physics/CPhysics.h"
#include "Physics/CCircleShape.h"
@@ -66,12 +68,16 @@ public:
int lives = 3;
int pastLives = 3;
int score = 0;
private:
dd::EventRelay<LevelSystem, dd::Events::Contact> m_EContact;
dd::EventRelay<LevelSystem, dd::Events::LifeLost> m_ELifeLost;
dd::EventRelay<LevelSystem, dd::Events::ScoreEvent> m_EScoreEvent;
bool OnContact(const dd::Events::Contact &event);
bool LifeLost(const dd::Events::LifeLost &event);
bool ScoreEvent(const dd::Events::ScoreEvent &event);
bool m_Initialized = false;