blob: 2c21b1d28a5f2f312bf2a5812811d1ad62a2dc12 (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#pragma once
using namespace std;
#include "PathfinderMob.h"
#include "Enemy.h"
class Level;
class CompoundTag;
class DamageSource;
class Monster : public PathfinderMob, public Enemy
{
public:
eINSTANCEOF GetType() { return eTYPE_MONSTER; }
static Entity *create(Level *level) { return nullptr; }
public:
Monster(Level *level);
virtual void aiStep();
virtual void tick();
protected:
virtual shared_ptr<Entity> findAttackTarget();
public:
virtual bool hurt(DamageSource *source, float dmg);
virtual bool doHurtTarget(shared_ptr<Entity> target);
protected:
virtual void checkHurtTarget(shared_ptr<Entity> target, float distance);
public:
virtual float getWalkTargetValue(int x, int y, int z);
protected:
virtual bool isDarkEnoughToSpawn();
public:
virtual bool canSpawn();
protected:
void registerAttributes();
};
|