HitLag has types in strings to send along to affect what systems lag.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Events
|
||||
|
||||
struct Pause : Event
|
||||
{
|
||||
|
||||
std::string Type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user