Creates a Background object that inherits Entity. More...
#include <Background.h>
Public Member Functions | |
Background (JAM_Texture *sprite, float x, float y, float width, float height, float velocity) | |
~Background () | |
void | update (float dt) |
![]() | |
JAM_Entity (JAM_Texture *sprite, float x, float y, float width, float height) | |
~JAM_Entity () | |
void | draw (SDL_Renderer *renderer) |
void | setPosition (float x, float y) |
void | setPosition (JAM_Vec2 position) |
void | setX (float x) |
void | setY (float y) |
void | setDimensions (float width, float height) |
void | setDimensions (JAM_Vec2 dimensions) |
void | setWidth (float width) |
void | setHeight (float height) |
JAM_Vec2 | getPosition () |
JAM_Vec2 | getDimensions () |
Private Attributes | |
float | velocity |
Creates a Background object that inherits Entity.
Background::Background | ( | JAM_Texture * | sprite, |
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
float | velocity | ||
) |
Constructs the Background object.
sprite | A pointer to the objects Texture. |
x | The x position of the Background. |
y | The y position of the Background. |
width | The width of the Background. |
height | The height of the Background. |
velocity | The velocity of the Background. |
Background::~Background | ( | ) |
Destructs the Background object.
|
virtual |
A function that updates the Background.
dt | The delta time. |
Implements JAM_Entity.
|
private |
The velocity of the Background.