Creates an Entity object that contains the details for the Entity.
More...
#include <entity.h>
Creates an Entity object that contains the details for the Entity.
Entity::Entity |
( |
Texture * |
inTexture, |
|
|
Vec2 |
inPos, |
|
|
Vec2 |
inSource, |
|
|
int |
inSpriteW, |
|
|
int |
inSpriteH, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
Constructs an Entity object
- Parameters
-
Texture | * A pointer to the texture |
Vec2 | The position of the Entity |
Vec2 | The position of the sprite |
int | The sprite width |
int | The sprite height |
int | The Entity width |
int | The Entity height |
void Entity::display |
( |
SDL_Renderer * |
renderer | ) |
|
Displays the Entity
- Parameters
-
SLD_Renderer | * A pointer to the renderer |
int Entity::getHeight |
( |
| ) |
|
Getter # Gets the height
- Returns
- int The height
Vec2 Entity::getPosition |
( |
| ) |
|
Getter # Gets the position
- Returns
- Vec2 The position
Getter # Gets the width
- Returns
- int The width
void Entity::setPosition |
( |
Vec2 |
inPos | ) |
|
Setter # Sets the position
- Parameters
-
The position of the sprite in the spritesheet
The dimensions of the sprite
The documentation for this class was generated from the following files: