Creates an Entity object Creates an Entity object with a Texture (including variables for the source and destination dimensions) and position.
More...
#include <entity.h>
|
Texture * | texture |
|
int | srcWidth |
|
int | srcHeight |
|
int | srcX |
|
int | srcY |
|
int | width |
|
int | height |
|
float | x |
|
float | y |
|
Creates an Entity object Creates an Entity object with a Texture (including variables for the source and destination dimensions) and position.
Entity::Entity |
( |
Texture * |
inputTexture, |
|
|
float |
inputX, |
|
|
float |
inputY, |
|
|
int |
inputWidth, |
|
|
int |
inputHeight |
|
) |
| |
Constructs a Entity object Constructs the Entity object.
- Parameters
-
Texture* | a pointer to a Texture loaded into memory. |
float | initial x position. |
float | initial y position. |
float | initial sprite width. |
float | initial sprite height. |
De-constructs an Entity object De-constructs the Entity object
void Entity::display |
( |
SDL_Renderer * |
renderer | ) |
|
Displays the modified Texture renderer Pushes the texture to the renderer using the dimensions specified in the Entity.
- Parameters
-
SDL_Renderer* | The renderer. |
Getter # source x position
- Returns
- int the source x position of the Entity object.
Getter # source y position
- Returns
- int the source y position of the Entity object.
Getter # x position
- Returns
- the x position of the Entity object.
Getter # y position
- Returns
- the y position of the Entity object.
void Entity::setSrcX |
( |
float |
inputX | ) |
|
Setter # source x position Sets the source x position of the Entity object to the inputed source x position.
- Parameters
-
float | the inputed source x position |
void Entity::setSrcY |
( |
float |
inputY | ) |
|
Setter # source y position Sets the source y position of the Entity object to the inputed source y position.
- Parameters
-
float | the inputed source y position |
void Entity::setX |
( |
float |
inputX | ) |
|
Setter # x position Sets the x position of the Entity object to the inputed x position.
- Parameters
-
float | the inputed x position |
void Entity::setY |
( |
float |
inputY | ) |
|
Setter # y position Sets the y position of the Entity object to the inputed y position.
- Parameters
-
float | the inputed y position |
The documentation for this class was generated from the following files:
- PGGAssignment1SDL/entity.h
- PGGAssignment1SDL/entity.cpp