31 virtual void render(
int frame, SDL_Renderer *renderer, SDL_Texture *texture) = 0;
Entity class.
Definition: Entity.h:18
Entity(float x, float y, int direction)
Definition: Entity.cpp:3
float getY() const
Definition: Entity.cpp:9
float speed
Definition: Entity.h:39
float getX() const
Definition: Entity.cpp:7
virtual void render(int frame, SDL_Renderer *renderer, SDL_Texture *texture)=0
render the entity
std::vector< SDL_Rect > sprites
Definition: Entity.h:41
virtual SDL_Rect getSprite(int frame, int direction)=0
bool isAtIntersection(std::shared_ptr< Intersection > dest)
return wether the entity is at an intersection
Definition: Entity.cpp:11
int direction
Definition: Entity.h:40
float x
Definition: Entity.h:37
float y
Definition: Entity.h:38
void setDirection(int d)
Definition: Entity.cpp:5