-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMovingEntity.h
More file actions
56 lines (34 loc) · 972 Bytes
/
MovingEntity.h
File metadata and controls
56 lines (34 loc) · 972 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
52
53
54
55
56
//
// Created by segalle on 08/11/2021.
//
#ifndef JOGO_MOVINGENTITY_H
#define JOGO_MOVINGENTITY_H
#include "Entity.h"
#include "Projectile.h"
namespace entities {
namespace characters {
class MovingEntity : public Entity {
protected:
int direction;
int health;
Projectile* fire;
sf::Vector2f speed;
bool ground;
static float gravity;
public:
MovingEntity();
virtual ~MovingEntity();
virtual void run() = 0;
virtual int getCollisionDamage() = 0;
virtual void attack() = 0;
void takeDamage(int dmg);
virtual Entity* getProjectile() = 0;
int getHealth();
void fall();
void setGround(bool on_ground);
void setFallSpeed(float speed);
void setHealth(int health);
};
}
}
#endif //JOGO_MOVINGENTITY_H