Creates a MapObject object that inherits Entity.
More...
#include <mapObject.h>
|
bool | collidable |
|
bool | damaging |
|
bool | deleteable |
|
float | velocity |
|
int | minX |
|
int | maxX |
|
bool | moveable |
|
Texture * | texture |
|
int | srcWidth |
|
int | srcHeight |
|
int | srcX |
|
int | srcY |
|
int | width |
|
int | height |
|
float | x |
|
float | y |
|
Creates a MapObject object that inherits Entity.
MapObject::MapObject |
( |
Texture * |
inputTexture, |
|
|
float |
inputX, |
|
|
float |
inputY |
|
) |
| |
Constructs a MapObject object Constructs the MapObject object.
- Parameters
-
Texture* | a pointer to a Texture loaded into memory. |
float | initial x position. |
float | initial y position. |
MapObject::~MapObject |
( |
| ) |
|
bool MapObject::getCollidable |
( |
| ) |
|
Getter # collidable Gets if the object is collidable
- Returns
- bool if the mapObject is collidable.
bool MapObject::getDamaging |
( |
| ) |
|
Getter # damaging
- Returns
- bool if the object causes damaging to the player.
bool MapObject::getDeletable |
( |
| ) |
|
Getter # deleteable
- Returns
- bool does the object need deleting.
float MapObject::getVelocity |
( |
| ) |
|
Getter # velocity
- Returns
- the velocity of the MapObject.
void MapObject::setCollidable |
( |
bool |
inputCollidable | ) |
|
Setter # collidable Sets if the object is able to be collided with.
- Parameters
-
bool | the collision boolean |
void MapObject::setDamaging |
( |
bool |
inputDamaging | ) |
|
Setter # damaging Sets if the object causes damaging to the player.
- Parameters
-
bool | the object causes damaging to the player. |
void MapObject::setDeletable |
( |
bool |
inputDelete | ) |
|
Setter # deleteable Sets if the object needs to be deleted.
- Parameters
-
bool | does the object need deleting. |
void MapObject::setVelocity |
( |
float |
inputVelocity | ) |
|
Setter # velocity Sets the velocity of the MapObject to the inputed velocity.
- Parameters
-
float | the inputed velocity |
void MapObject::updateX |
( |
float |
dt | ) |
|
Updates the x position of the MapObject Performers a check on the updated position of the x to see if it within boundaries. If it is within boundaries then it updates the x position using the velocity and the inputed deltaTime. If it is not within boundaries then it resets the x position to the boundaries.
- Parameters
-
float | the inputed deltaTime |
The documentation for this class was generated from the following files:
- PGGAssignment1SDL/mapObject.h
- PGGAssignment1SDL/mapObject.cpp