-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntity.hpp
More file actions
39 lines (30 loc) · 723 Bytes
/
Entity.hpp
File metadata and controls
39 lines (30 loc) · 723 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
#ifndef ENTITY_HPP
#define ENTITY_HPP
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <iostream>
#include "Math.hpp"
class Entity {
public:
Entity(Vector2f pos_in, SDL_Texture *in_tex) : pos(pos_in), tex(in_tex) {
current_frame.x = 0;
current_frame.y = 0;
current_frame.w = 32;
current_frame.h = 32;
}
//Getters
Vector2f& getPos(){
return pos;
}
SDL_Texture* getTexture(){
return tex;
}
SDL_Rect getCurrFrame(){
return current_frame;
}
private:
Vector2f pos;
SDL_Rect current_frame;
SDL_Texture* tex;
};
#endif