Creates a MapSquare object that inherits Entity. More...
#include <MapSquare.h>
Public Member Functions | |
MapSquare (JAM_Texture *sprite, float x, float y, float width, float height, bool danger) | |
~MapSquare () | |
void | update (float dt) |
void | setDanger (bool danger) |
bool | getDanger () |
Public Member Functions inherited from JAM_Entity | |
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 | |
bool | danger |
Creates a MapSquare object that inherits Entity.
MapSquare::MapSquare | ( | JAM_Texture * | sprite, |
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
bool | danger | ||
) |
MapSquare::~MapSquare | ( | ) |
Destructs the MapSquare object.
bool MapSquare::getDanger | ( | ) |
Getter # Get the danger boolean.
void MapSquare::setDanger | ( | bool | danger | ) |
Setter # Set the danger boolean.
danger | If the MapSquare is dangerous. |
|
virtual |
|
private |
A Boolean for if the square is dangerous.