-
Notifications
You must be signed in to change notification settings - Fork 2
/
enemy.h
58 lines (38 loc) · 920 Bytes
/
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
#pragma once
#include "unit.h"
#include "ForagerPlayer.h"
#define PI 3.1415926f
class earth;
class enemy :public unit
{
protected:
ForagerPlayer* _target;
earth* _map;
int FindEnemyTilePos();
protected :
int _index;
int _attackIndex;
int _count;
int _enemyMoveCount;
int _appearCount;
float enemySpeedX;
float enemySpeedY;
float _angle;
bool isLeft;
bool isAngle;
bool enemyMoving;
bool checkDestination;
int _enemyTilePos;
vector<int> _vDestTileIndex;
int _destCount;
public:
void setLinkMap(earth* map) { _map = map; };
earth* getMap() { return _map; };
void setEnemy(string key, string itemkey, ForagerPlayer* target, POINT pos, int p_hp = 100);
void render(HDC hdc) override ;
void update() override;
void hurt(int damage, bool onlyEffect = false) override;
void dead() override;
float shootToTarget();
//virtual void move(vector<int> vDestTileIndex);
};