P-button pauses, H-button does 0.3 second HitLag.

This commit is contained in:
PlatinumSkink
2015-09-30 15:19:45 +02:00
parent 2fb16357fa
commit c31ff4cfcb
11 changed files with 262 additions and 51 deletions
+17
View File
@@ -20,6 +20,8 @@
#include "Game/EMultiBall.h"
#include "Game/EMultiBallLost.h"
#include "Game/EGameOver.h"
#include "Game/EPause.h"
#include "Game/EHitLag.h"
namespace dd
{
@@ -75,6 +77,10 @@ public:
void SetReplaceBall(const bool& replaceBall) { m_ReplaceBall = replaceBall; }
bool MultiBall() const { return m_MultiBall; }
void SetMultiBall(const bool& multiBall) { m_MultiBall = multiBall; }
bool Pause() const { return m_Pause; }
void SetPause(const bool& pause) { m_Pause = pause; }
bool HitLag() const { return m_HitLag; }
void SetHitLag(const bool& hitLag) { m_HitLag = hitLag; }
private:
float m_XMovementMultiplier = 2.f;
@@ -85,6 +91,13 @@ private:
int m_PastLives = 3;
bool m_ReplaceBall = false;
bool m_MultiBall = false;
bool m_Pause = false;
bool m_HitLag = false;
float m_Time;
float m_SlowdownTime;
float m_HitLagTimer = 0;
float m_HitLagPlacement = 0;
EntityID m_Ball;
@@ -92,11 +105,15 @@ private:
dd::EventRelay<BallSystem, dd::Events::MultiBallLost> m_EMultiBallLost;
dd::EventRelay<BallSystem, dd::Events::ResetBall> m_EResetBall;
dd::EventRelay<BallSystem, dd::Events::MultiBall> m_EMultiBall;
dd::EventRelay<BallSystem, dd::Events::Pause> m_EPause;
dd::EventRelay<BallSystem, dd::Events::HitLag> m_EHitLag;
bool OnLifeLost(const dd::Events::LifeLost &event);
bool OnMultiBallLost(const dd::Events::MultiBallLost &event);
bool OnResetBall(const dd::Events::ResetBall &event);
bool OnMultiBall(const dd::Events::MultiBall &event);
bool OnPause(const dd::Events::Pause &event);
bool OnHitLag(const dd::Events::HitLag &event);
};
}