From 75260997ad2763c56d8877b67e94693b5c46afa7 Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Wed, 20 Aug 2014 08:28:37 -0600 Subject: Revert "Fixed all compile errors for AIAggressiveComponent and AIComponent." This reverts commit 62a8403e4c61bd50680e9d8712506b951ac61b48. --- src/Entities/Compoments/AIAgressiveComponent.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/Entities/Compoments/AIAgressiveComponent.h (limited to 'src/Entities/Compoments/AIAgressiveComponent.h') 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 -- cgit v1.2.3