blob: 1d9e4fcd95303092a962c511fac04f8474fcc1fe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
};
|