diff options
author | Samuel Barney <samjbarney@gmail.com> | 2014-08-20 16:28:37 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2014-08-20 16:28:37 +0200 |
commit | 75260997ad2763c56d8877b67e94693b5c46afa7 (patch) | |
tree | 5310965e089bf9d78269d86a4eebe4d5f14533e6 /src/Entities/Compoments/AIAgressiveComponent.h | |
parent | Fixed all compile errors for AIAggressiveComponent and AIComponent. (diff) | |
download | cuberite-75260997ad2763c56d8877b67e94693b5c46afa7.tar cuberite-75260997ad2763c56d8877b67e94693b5c46afa7.tar.gz cuberite-75260997ad2763c56d8877b67e94693b5c46afa7.tar.bz2 cuberite-75260997ad2763c56d8877b67e94693b5c46afa7.tar.lz cuberite-75260997ad2763c56d8877b67e94693b5c46afa7.tar.xz cuberite-75260997ad2763c56d8877b67e94693b5c46afa7.tar.zst cuberite-75260997ad2763c56d8877b67e94693b5c46afa7.zip |
Diffstat (limited to 'src/Entities/Compoments/AIAgressiveComponent.h')
-rw-r--r-- | src/Entities/Compoments/AIAgressiveComponent.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Entities/Compoments/AIAgressiveComponent.h b/src/Entities/Compoments/AIAgressiveComponent.h new file mode 100644 index 000000000..2cd3f2304 --- /dev/null +++ b/src/Entities/Compoments/AIAgressiveComponent.h @@ -0,0 +1,22 @@ +#pragma once +#include "AIComponent.h" + +class cAIAgressiveComponent : public cAIComponent { +protected: + enum MState{ATTACKING, IDLE, CHASING, ESCAPING} m_EMState; + cEntity * m_Target; +public: + cAIAgressiveComponent(cMonster * a_Monster) : cAIComponent(a_Monster), m_Target(null){} + + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; + virtual void InStateChasing(float a_Dt); + + virtual void EventSeePlayer(cEntity *); + virtual void Attack(float a_Dt); + +protected: + virtual void EventLosePlayer(void); + virtual void CheckEventLostPlayer(void); + + bool IsMovingToTargetPosition(); +}
\ No newline at end of file |