summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2014-08-26 01:21:35 +0200
committerSamuel Barney <samjbarney@gmail.com>2014-08-26 01:21:35 +0200
commit520553e1b8b847ddc3b54a847aa9ba36c4c1b35d (patch)
tree80e38be9bea070cf522eefca473bb22968cee4b5
parentAdded some functionality to the Movement Component (diff)
downloadcuberite-520553e1b8b847ddc3b54a847aa9ba36c4c1b35d.tar
cuberite-520553e1b8b847ddc3b54a847aa9ba36c4c1b35d.tar.gz
cuberite-520553e1b8b847ddc3b54a847aa9ba36c4c1b35d.tar.bz2
cuberite-520553e1b8b847ddc3b54a847aa9ba36c4c1b35d.tar.lz
cuberite-520553e1b8b847ddc3b54a847aa9ba36c4c1b35d.tar.xz
cuberite-520553e1b8b847ddc3b54a847aa9ba36c4c1b35d.tar.zst
cuberite-520553e1b8b847ddc3b54a847aa9ba36c4c1b35d.zip
-rw-r--r--src/Mobs/Components/AttackComponent.h16
1 files changed, 16 insertions, 0 deletions
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; }
};