summaryrefslogtreecommitdiffstats
path: root/src/Entities/Compoments/AIAgressiveComponent.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/Compoments/AIAgressiveComponent.h')
-rw-r--r--src/Entities/Compoments/AIAgressiveComponent.h22
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