This class stores information for an Object in the game.
void deactivate()
Sets active to false.
int getEmotion() const
Get current emotion state.
void checkDisplayable(Object screen)
Checks if an the Entity is in the current screen by passing the screen to it.
void setEmotion(int e)
Set current emotion state.
SDL_Rect getDetect() const
Returns the detection radius.
double getMaxHealth() const
Get max health.
void setHealth(double h)
Set the Entity's health. If the health is higher then the max health it will set it to the max health...
void setMaxHealth(double mh)
Set max health.
void activate()
Sets active to true.
int getTeam() const
Get Entity's team.
void setDetect(SDL_Rect d)
Sets the detection with another SDL_Rect.
Class for storing health, emotion, team, etc. of an Object.
void setDetectRange(int r)
Sets the detection radius with a single given distance.
void heal(double h)
Give health to the Entity.
void setTeam(int t)
Set Entity's team.
Class used for calculating different types of collision between given Objects.
double getHealth() const
Get Entity's health.
bool isActive() const
Check if Entity is active.
void damage(double d)
Deal damage. Subtracted from health. If health is less then zero it kills the entity.
void kill()
Sets health to zero and deactives the Entity.