diff options
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorAggressive.h')
-rw-r--r-- | src/Mobs/Behaviors/BehaviorAggressive.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Mobs/Behaviors/BehaviorAggressive.h b/src/Mobs/Behaviors/BehaviorAggressive.h index 840d925d5..434565a65 100644 --- a/src/Mobs/Behaviors/BehaviorAggressive.h +++ b/src/Mobs/Behaviors/BehaviorAggressive.h @@ -4,13 +4,18 @@ class cBehaviorAggressive; #include "Behavior.h" +#include <functional> /** The mob is agressive toward specific mobtypes, or toward the player. This Behavior has a dependency on BehaviorAttacker. */ + +typedef std::function<bool(cBehaviorAggressive & a_Behavior, cMonster & a_Monster)> ShouldBeAggressiveFunction; + class cBehaviorAggressive : public cBehavior { public: + cBehaviorAggressive(ShouldBeAggressiveFunction a_ShouldBeAggressiveFunction = nullptr); void AttachToMonster(cMonster & a_Parent); // cBehaviorAggressive(cMonster * a_Parent, bool a_HatesPlayer); @@ -28,4 +33,8 @@ private: // The mob we want to attack cPawn * m_Target; + + ShouldBeAggressiveFunction m_ShouldBeAggressiveFunction; + bool m_ShouldBeAgressive; + int m_AgressionCheckCountdown; }; |