HitLag has types in strings to send along to affect what systems lag.

This commit is contained in:
PlatinumSkink
2015-10-01 14:14:07 +02:00
parent c63ec035a7
commit 4d3428f125
10 changed files with 79 additions and 19 deletions
+3
View File
@@ -90,6 +90,9 @@ private:
bool m_MultiBall = false;
bool m_Pause = false;
glm::vec3 m_SavedSpeed;
bool m_InitializePause = false;
EntityID m_Ball;
dd::EventRelay<BallSystem, dd::Events::LifeLost> m_ELifeLost;
+2
View File
@@ -18,6 +18,8 @@ struct Ball : Component
int Number = 0;
float Speed = 5.f;
int Combo = 0;
bool Paused = false;
glm::vec3 SavedSpeed = glm::vec3(0, 0, 0);
};
}
+1 -1
View File
@@ -15,7 +15,7 @@ namespace Events
struct Pause : Event
{
std::string Type;
};
}
+8
View File
@@ -57,16 +57,24 @@ public:
void Initialize() override;
void Update(double dt) override;
void FlipPause();
bool IsPaused() 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; }
float& HitLagDuration() { return m_HitLagDuration; }
void SetHitLagDuration(const float& hitLagDuration) { m_HitLagDuration = hitLagDuration; }
float& HitLagTimer() { return m_HitLagTimer; }
void SetHitLagTimer(const float& hitLagTimer) { m_HitLagTimer = hitLagTimer; }
std::string& CurrentType() { return m_CurrentType; }
void SetCurrentType(const std::string& currentType) { m_CurrentType = currentType; }
private:
bool m_Pause;
bool m_HitLag;
float m_HitLagDuration;
float m_HitLagTimer;
std::string m_CurrentType;
dd::EventRelay<HitLagSystem, dd::Events::Pause> m_EPause;
dd::EventRelay<HitLagSystem, dd::Events::HitLag> m_EHitLag;