From 520553e1b8b847ddc3b54a847aa9ba36c4c1b35d Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Mon, 25 Aug 2014 17:21:35 -0600 Subject: Added some functionality to the Attack Component --- src/Mobs/Components/AttackComponent.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/Mobs') diff --git a/src/Mobs/Components/AttackComponent.h b/src/Mobs/Components/AttackComponent.h index ca0bbd815..6a6932bd3 100644 --- a/src/Mobs/Components/AttackComponent.h +++ b/src/Mobs/Components/AttackComponent.h @@ -8,9 +8,25 @@ class cAttackComponent { protected: cMonster * m_Self; + float m_AttackRate; + int m_AttackDamage; + int m_AttackRange; + float m_AttackInterval; public: cAttackComponent(cMonster * a_Entity); virtual ~cAttackComponent(){} virtual void Tick(float a_Dt, cChunk & a_Chunk){} + + // Get Functions + int GetAttackRate() { return (int)m_AttackRate; } + int GetAttackRange() { return m_AttackRange; } + int GetAttackDamage() { return m_AttackDamage; } + float GetAttackInterval() { return m_AttackInterval; } + + // Set Functions + void SetAttackRate(float a_AttackRate) { m_AttackRate = a_AttackRate; } + void SetAttackRange(int a_AttackRange) { m_AttackRange = a_AttackRange; } + void SetAttackDamage(int a_AttackDamage) { m_AttackDamage = a_AttackDamage; } + void SetAttackInterval(float a_AttackInterval) { m_AttackInterval = a_AttackInterval; } }; -- cgit v1.2.3