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

An Entity that contains velocities. More...

#include <EB_Velocity.h>

Inheritance diagram for EB_Velocity:
Inheritance graph
Collaboration diagram for EB_Velocity:
Collaboration graph

Public Member Functions

 EB_Velocity (C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, C_Vec2 velocities, std::string iD, float *universalSpee)
 Constructs the Velocity Entity. More...
 
 ~EB_Velocity ()
 Destructs the Velocity Entity object. More...
 
virtual void update (float dt)=0
 A pure virtual function that updates the Entity. More...
 
void updatePosWithVelocities (float dt)
 Updates the position of the Entity using the velocities. More...
 
void setVelocities (C_Vec2 velocity)
 Sets the velocities of the Entity. More...
 
C_Vec2 getVelocities ()
 Gets the velocities of the Entity. More...
 
- Public Member Functions inherited from EB_Entity
 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 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_Vec2 velocities
 The velocities of the Entity. More...
 
- Protected Attributes inherited from EB_Entity
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

An Entity that contains velocities.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

EB_Velocity::EB_Velocity ( C_Texture sprite,
C_Vec2  pos,
C_Vec2  dimensions,
C_Vec2  velocities,
std::string  iD,
float *  universalSpee 
)

Constructs the Velocity Entity.

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

Destructs the Velocity Entity object.

Member Function Documentation

C_Vec2 EB_Velocity::getVelocities ( )

Gets the velocities of the Entity.

Returns
The velocities of the Entity.
void EB_Velocity::setVelocities ( C_Vec2  velocity)

Sets the velocities of the Entity.

Parameters
velocitiesThe inputed velocity.
virtual void EB_Velocity::update ( float  dt)
pure virtual

A pure virtual function that updates the Entity.

Parameters
dtThe delta time.

Implements EB_Entity.

Implemented in EA_FlamingArrow, EPU_Pickup, EA_PlayerArrow, B_Background, EA_ArcherArrow, and EE_StyphBird.

void EB_Velocity::updatePosWithVelocities ( float  dt)

Updates the position of the Entity using the velocities.

Parameters
dtThe delta time.

Here is the caller graph for this function:

Member Data Documentation

C_Vec2 EB_Velocity::velocities
protected

The velocities of the Entity.


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