Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Protected Attributes | List of all members
EB_Entity Class Referenceabstract

Contains variables and functions to be inherited by classes that are about Entities. More...

#include <EB_Entity.h>

Inheritance diagram for EB_Entity:
Inheritance graph
Collaboration diagram for EB_Entity:
Collaboration graph

Public Member Functions

 EB_Entity (C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, std::string iD, float *universalSpeed)
 Constructs the Entity object. More...
 
 ~EB_Entity ()
 Destructs the Entity object. More...
 
virtual void update (float dt)=0
 A pure virtual function that updates the Entity. More...
 
virtual void draw (SDL_Renderer *renderer)
 A virtual function that draws the Entity to the screen. More...
 
void setPosition (C_Vec2 pos)
 Sets the position of the Entity. More...
 
void setX (float x)
 Sets the x position of the Entity. More...
 
void setY (float y)
 Sets the y position of the Entity. More...
 
void setDimensions (C_Vec2 dimensions)
 Sets the dimensions of the Entity. More...
 
void setWidth (float width)
 Sets the width of the Entity. More...
 
void setHeight (float height)
 Sets the height of the Entity. More...
 
C_Vec2 getPosition ()
 Gets the position of the Entity. More...
 
C_Vec2 getDimensions ()
 Gets the dimensions of the Entity. More...
 

Protected Attributes

C_Texturesprite
 A pointer to the Entity Texture. More...
 
C_Vec2 pos
 The position of the Entity. More...
 
C_Vec2 dimensions
 The dimensions of the Entity. More...
 
std::string iD
 The ID of the type of Entity. More...
 
float * universalSpeed
 A pointer for the universal speed of the game. More...
 

Detailed Description

Contains variables and functions to be inherited by classes that are about Entities.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

EB_Entity::EB_Entity ( C_Texture sprite,
C_Vec2  pos,
C_Vec2  dimensions,
std::string  iD,
float *  universalSpeed 
)

Constructs the Entity object.

Parameters
spriteA pointer to the objects Texture.
posThe position of the Entity.
dimensionsThe dimensions of the Entity.
iDThe ID of the Entity type.
universalSpeedA pointer for the universal speed of the game.
EB_Entity::~EB_Entity ( )

Destructs the Entity object.

Member Function Documentation

void EB_Entity::draw ( SDL_Renderer *  renderer)
virtual

A virtual function that draws the Entity to the screen.

Parameters
rendererA pointer to the SDL renderer.

Reimplemented in UI_Button, EP_Player, EA_FlamingArrow, EB_Animated, and EPU_Health.

Here is the call graph for this function:

Here is the caller graph for this function:

C_Vec2 EB_Entity::getDimensions ( )

Gets the dimensions of the Entity.

Returns
The dimensions of the Entity.

Here is the caller graph for this function:

C_Vec2 EB_Entity::getPosition ( )

Gets the position of the Entity.

Returns
The position of the Entity.

Here is the caller graph for this function:

void EB_Entity::setDimensions ( C_Vec2  dimensions)

Sets the dimensions of the Entity.

Parameters
dimensionsThe new dimensions of the Entity.

Here is the caller graph for this function:

void EB_Entity::setHeight ( float  height)

Sets the height of the Entity.

Parameters
heightThe new height of the Entity.
void EB_Entity::setPosition ( C_Vec2  pos)

Sets the position of the Entity.

Parameters
positionThe new position of the Entity.

Here is the caller graph for this function:

void EB_Entity::setWidth ( float  width)

Sets the width of the Entity.

Parameters
widthThe new width of the Entity.
void EB_Entity::setX ( float  x)

Sets the x position of the Entity.

Parameters
xThe x position of the Entity.
void EB_Entity::setY ( float  y)

Sets the y position of the Entity.

Parameters
yThe y position of the Entity.
virtual void EB_Entity::update ( float  dt)
pure virtual

A pure virtual function that updates the Entity.

Parameters
dtThe delta time.

Implemented in UI_Button, EP_Player, EA_FlamingArrow, EB_Animated, EB_VelocityAnimated, EPU_Pickup, EA_PlayerArrow, EB_Velocity, EE_Archer, EE_StormCloud, EP_PlayerArcher, B_Background, EA_ArcherArrow, and EE_StyphBird.

Member Data Documentation

C_Vec2 EB_Entity::dimensions
protected

The dimensions of the Entity.

std::string EB_Entity::iD
protected

The ID of the type of Entity.

C_Vec2 EB_Entity::pos
protected

The position of the Entity.

C_Texture* EB_Entity::sprite
protected

A pointer to the Entity Texture.

float* EB_Entity::universalSpeed
protected

A pointer for the universal speed of the game.


The documentation for this class was generated from the following files: