summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorAttackerMelee.h
blob: f744d0955b8050a6328034105a845001781549ad (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
24
25
26
#pragma once

#include "BehaviorAttacker.h"
#include <functional>
class cBehaviorAttackerMelee;

/** Grants the mob that ability to approach a target and then melee attack it.
Use BehaviorAttackerMelee::SetTarget to attack.


Connections to other behaviors:
 - See cBehaviorAttacker.

Special connections:
 - None.

*/
typedef std::function<void(cBehaviorAttackerMelee & a_Behavior, cMonster & a_Attacker, cPawn & a_Attacked)> PostAttackFunction;
class cBehaviorAttackerMelee : public cBehaviorAttacker
{
public:
	cBehaviorAttackerMelee(PostAttackFunction a_PostAttackFunction = nullptr);
	bool DoStrike(int a_StrikeTickCnt) override;
private:
	 PostAttackFunction m_PostAttackFunction;
};