Added ScoreEvent, added score to bricks. Stage resets after all bricks are destroyed.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user