-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntity.h
More file actions
57 lines (33 loc) · 939 Bytes
/
Entity.h
File metadata and controls
57 lines (33 loc) · 939 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
57
//
// Created by segalle on 08/11/2021.
//
#ifndef JOGO_ENTITY_H
#define JOGO_ENTITY_H
#include "SFML/Graphics.hpp"
#include "WindowManager.h"
#include "Being.h"
namespace entities {
class Entity : public Being {
protected:
sf::Vector2f position;
sf::Sprite* sprite;
bool alive;
public:
Entity();
virtual ~Entity();
virtual void run() = 0;
virtual int getCollisionDamage() = 0;
const sf::Vector2f getPosition() const;
void setPosition(sf::Vector2f position);
void setPosition(float x, float y = 0);
sf::Sprite* getSprite();
void setSprite(sf::Sprite* sprite);
float getFeetPosition();
void setFeetPosition(float feet_position = 725);
void die();
bool getIsAlive();
void move(sf::Vector2f amount);
void setIsAlive(bool isAlive);
};
}
#endif //JOGO_ENTITY_H