-
Notifications
You must be signed in to change notification settings - Fork 0
/
Entity.h
50 lines (39 loc) · 824 Bytes
/
Entity.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
//
// Created by hamod on 05/12/2019.
//
#ifndef BALLGAME_ENTITY_H
#define BALLGAME_ENTITY_H
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
class Play_State;
class Entity : public sf::Sprite {
public:
/**
* Default constructor
*/
Entity();
/**
* Constuctor for entity
* @param w
* @param h
* @param pos
* @param c
*/
Entity(int w, int h, sf::Vector2f pos, sf::Color c);
Entity(const Entity&) = delete;
Entity&operator=(const Entity&) = delete;
~Entity() override = default;
/**
* Updates entity
*/
virtual void update() = 0;
/**
* Action after collision has been detected
* @param play_state
*/
virtual void collision(Play_State &play_state) = 0;
protected:
int width{};
int height{};
};
#endif //BALLGAME_ENTITY_H