Jamie Slowgrove - PGG Assignment 1 - SDL
 All Classes Functions
Public Member Functions | Protected Attributes | List of all members
Creature Class Reference

Creates a Creature object that inherits Entity. More...

#include <creature.h>

Inheritance diagram for Creature:
Inheritance graph
Collaboration diagram for Creature:
Collaboration graph

Public Member Functions

 Creature (Texture *, float, float)
 
 ~Creature ()
 
void setVelocityX (float)
 
void setVelocityY (float)
 
void updateX (float)
 
void updateY (float)
 
float getVelocityX ()
 
float getVelocityY ()
 
- Public Member Functions inherited from Entity
 Entity (Texture *, float, float, int, int)
 
 ~Entity ()
 
void display (SDL_Renderer *)
 
void setX (float)
 
void setY (float)
 
float getX ()
 
float getY ()
 
void setSrcX (float)
 
void setSrcY (float)
 
int getSrcX ()
 
int getSrcY ()
 

Protected Attributes

float velocityX
 
float velocityY
 
- Protected Attributes inherited from Entity
Texturetexture
 
int srcWidth
 
int srcHeight
 
int srcX
 
int srcY
 
int width
 
int height
 
float x
 
float y
 

Detailed Description

Creates a Creature object that inherits Entity.

Constructor & Destructor Documentation

Creature::Creature ( Texture inputTexture,
float  inputX,
float  inputY 
)

Constructs a Creature object Constructs the Creature object.

Parameters
Texture*a pointer to a Texture loaded into memory.
floatinitial x position.
floatinitial y position.
Creature::~Creature ( )

De-constructs a Creature object De-constructs the Creature object

Member Function Documentation

float Creature::getVelocityX ( )

Getter # x velocity

Returns
the x velocity of the Creature object.

Here is the caller graph for this function:

float Creature::getVelocityY ( )

Getter # y velocity

Returns
the y velocity of the Creature object.

Here is the caller graph for this function:

void Creature::setVelocityX ( float  inputVelocity)

Setter # x velocity Sets the x velocity of the Creature object to the inputed velocity.

Parameters
floatthe inputed velocity

Here is the caller graph for this function:

void Creature::setVelocityY ( float  inputVelocity)

Setter # y velocity Sets the y velocity of the Creature object to the inputed velocity.

Parameters
floatthe inputed velocity

Here is the caller graph for this function:

void Creature::updateX ( float  dt)

Updates the x position of the Creature

Parameters
floatthe inputed deltaTime

Here is the caller graph for this function:

void Creature::updateY ( float  dt)

Updates the y position of the Creature

Parameters
floatthe inputed deltaTime

Here is the caller graph for this function:


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