summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorAttackerRanged.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorAttackerRanged.h')
-rw-r--r--src/Mobs/Behaviors/BehaviorAttackerRanged.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Mobs/Behaviors/BehaviorAttackerRanged.h b/src/Mobs/Behaviors/BehaviorAttackerRanged.h
index 012590490..1d9e4fcd9 100644
--- a/src/Mobs/Behaviors/BehaviorAttackerRanged.h
+++ b/src/Mobs/Behaviors/BehaviorAttackerRanged.h
@@ -1,11 +1,23 @@
#pragma once
#include "BehaviorAttacker.h"
+#include <functional>
+class cBehaviorAttackerRanged;
/** Grants the mob that ability to approach a target and then melee attack it.
Use BehaviorAttackerMelee::SetTarget to attack. */
+typedef std::function<void(cBehaviorAttackerRanged & a_Behavior,
+ cMonster & a_Attacker, cPawn & a_Attacked)> RangedShootingFunction;
+
class cBehaviorAttackerRanged : public cBehaviorAttacker
{
public:
+ cBehaviorAttackerRanged(RangedShootingFunction a_RangedShootingFUnction,
+ int a_ProjectileAmount = 1, int a_ShootingIntervals = 1);
bool DoStrike(int a_StrikeTickCnt) override;
+
+private:
+ RangedShootingFunction m_ShootingFunction;
+ int m_ProjectileAmount;
+ int m_ShootingIntervals;
};