summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorCoward.h
blob: 13deece611ff6565d091c31d10e5abb78f9dae3f (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
27
#pragma once

#include "Behavior.h"

// Makes the mob run away from any other mob that damages it

//fwds
class cMonster;
class cItems;
class cEntity;
struct TakeDamageInfo;

class cBehaviorCoward : cBehavior
{
public:
	cBehaviorCoward(cMonster * a_Parent);

	// Functions our host Monster should invoke:
	bool IsControlDesired() override;
	void Tick() override;
	void DoTakeDamage(TakeDamageInfo & a_TDI) override;


private:
	cMonster * m_Parent;  // Our Parent
	cEntity * m_Attacker;  // The entity we're running away from
};