Entity class.
Plus de détails...
#include <Entity.h>
Entity class.
this class is used to store the entities (pacman and ghosts). It is an abstract class.
◆ Entity()
Entity::Entity |
( |
float |
x, |
|
|
float |
y, |
|
|
int |
direction |
|
) |
| |
◆ getSprite()
virtual SDL_Rect Entity::getSprite |
( |
int |
frame, |
|
|
int |
direction |
|
) |
| |
|
protectedpure virtual |
◆ getX()
float Entity::getX |
( |
| ) |
const |
◆ getY()
float Entity::getY |
( |
| ) |
const |
◆ isAtIntersection()
bool Entity::isAtIntersection |
( |
std::shared_ptr< Intersection > |
dest | ) |
|
|
protected |
return wether the entity is at an intersection
- Paramètres
-
- Renvoie
- true
-
false
◆ render()
virtual void Entity::render |
( |
int |
frame, |
|
|
SDL_Renderer * |
renderer, |
|
|
SDL_Texture * |
texture |
|
) |
| |
|
pure virtual |
render the entity
this method is used to render the entity. It is a pure virtual method. It is implemented in the subclasses.
- Paramètres
-
Implémenté dans Pacman, et Ghosts.
◆ setDirection()
void Entity::setDirection |
( |
int |
d | ) |
|
◆ direction
◆ speed
◆ sprites
std::vector<SDL_Rect> Entity::sprites |
|
protected |
La documentation de cette classe a été générée à partir du fichier suivant :