-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactor.h
executable file
·53 lines (41 loc) · 992 Bytes
/
actor.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
#ifndef ACTOR_H
#define ACTOR_H
#include <deque>
#include "bullet.h"
#include "notice.h"
typedef std::deque<Bullet *> BulletList;
typedef std::deque<Notice *> NoticeList;
class Actor {
public:
int health;
int fullHealth;
AttackType attackType;
int attackTimer;
int attackRegenerateTime;
int resistance[6]; // percent of how resistant they are to various attacks
AttackType blockType;
int blockTimer;
int blockRegenerateTime;
bool enemy;
int avatarId;
int avatarDeadId;
int shieldId;
int avatarWidth; // in tiles
int avatarHeight; // in tiles
int tx,ty;
BulletList bulletList;
NoticeList noticeList;
Tile *tile;
Actor(Tile *tile);
virtual ~Actor();
virtual void resetGame();
virtual void update(int elapse);
virtual void draw();
virtual void handleAction(int id,bool down);
bool isAlive();
bool isAttackReady();
void attack(Actor *target,bool heavy);
void receiveAttack(int amount, AttackType type);
void block(AttackType type);
};
#endif