-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnemy.h
69 lines (64 loc) · 1.41 KB
/
Enemy.h
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef __ENEMY_H__
#define __ENEMY_H__
#include "Object.h"
#include "FOV.h"
#include "Player.h"
class FOV;
enum MovementPatern {
backAndForth,
horizontal,
vertical,
diamond,
hugObstacle,
square
};
class Enemy :
public df::Object
{
private:
int bullets;
int move_countdown;
int move_slowdown;
int fire_countdown;
int fire_slowdown;
float d_x;
float d_y;
float left_x;
float bottom_y;
float right_x;
float top_y;
bool facingLeft;
FOV* myFOV;
df::Vector FOVector;
MovementPatern movementPattern;
//df::Vector top;
//df::Vector bottom;
//df::Vector left;
//df::Vector right;
//Moves Enemy
bool canShoot;
bool bounce;
public:
Enemy(df::Vector position, bool direction, MovementPatern mp);
Enemy();
~Enemy();
int eventHandler(const df::Event* p_e);
//Enemy shoots bullet
int shoot();
void step();
void setFOV(FOV* fov);
FOV* getFOV();
void setCanShoot(bool shoot = true);
bool CanShoot() const;
bool CanBounce() const;
void move();
void setMovement(MovementPatern mp);
MovementPatern getMovement() const;
void movementBackAndForth();
void movementHorizontal();
void movementVertical();
void moveSquare();
void movementDiamond();
void movementHugObstacle();
};
#endif //__ENEMY_H__