-
Notifications
You must be signed in to change notification settings - Fork 1
/
SDLGameObject.h
40 lines (28 loc) · 881 Bytes
/
SDLGameObject.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
#ifndef SDLGAMEOBJECT_H
#define SDLGAMEOBJECT_H
#include "GameObject.h"
#include "TextureManager.h"
#include "Vector2D.h"
class SDLGameObject : public GameObject //Inherance from ABSTRACT GameObject
{
public:
SDLGameObject(const LoaderParams* pParams);
virtual void draw();
virtual void update();
virtual void clean();
//GETs
Vector2D& getPosition();
int getWidth();
int getHeight();
protected:
Vector2D m_position; //controls position of the GameObject
Vector2D m_velocity; //controls velocity of the GameObject
Vector2D m_acceleration; //controls acceleration of the GameObject
int m_width;
int m_height;
int m_currentRow;
int m_currentFrame;
int m_numFrames;
string m_textureID;
};
#endif // SDLGAMEOBJECT_H