-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnemy.h
More file actions
52 lines (40 loc) · 875 Bytes
/
Enemy.h
File metadata and controls
52 lines (40 loc) · 875 Bytes
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
#pragma once
#include "GameObject.h"
class MissileManager;
class Tank;
class Image;
class Player;
class Enemy : public GameObject // is-a
{
private:
FPOINT pos;
FPOINT pos2;
int dir;
float moveSpeed;
float missileSpeed;
float angle;
bool isAlive;
int size;
Player* target;
Image* image;
int animationFrame;
int elapsedFrame;
float elapsedTime;
int e_timer;
int fallTimer;
MissileManager* e_missileManager;
public:
void Init(float posX = 0.0f, float posY = 0.0f);
void Release();
void Update();
void MissileUpdate();
void Render(HDC hdc);
void Move();
inline void SetIsAlive(bool isAlive) { this->isAlive = isAlive; }
inline bool GetIsAlive() { return isAlive; }
//inline void SetTarget(Tank* target) { this->target = target; }
inline FPOINT GetPos() { return pos; }
inline int GetSize() { return size; }
Enemy();
~Enemy();
};