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

Creates an Enemy object that inherits MapObject which in turn inherits Creature. More...

#include <enemy.h>

Inheritance diagram for Enemy:
Inheritance graph
Collaboration diagram for Enemy:
Collaboration graph

Public Member Functions

 Enemy (Texture *, float, float, int)
 
 ~Enemy ()
 
void typeSetup ()
 
void setDeletable (bool)
 
bool getDeletable ()
 
void setSpeed (float)
 
float getSpeed ()
 
int getType ()
 
- Public Member Functions inherited from Creature
 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

int type
 
bool deleteable
 
float speed
 
- Protected Attributes inherited from Creature
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 an Enemy object that inherits MapObject which in turn inherits Creature.

Constructor & Destructor Documentation

Enemy::Enemy ( Texture inputTexture,
float  inX,
float  inY,
int  inType 
)

Constructs an Enemy object Constructs the Enemy object.

Parameters
Texture*a pointer to a Texture loaded into memory.
floatinitial x position.
floatinitial y position.
intthe Enemy type.

Here is the call graph for this function:

Enemy::~Enemy ( )

De-constructs an Enemy object De-constructs the Enemy object

Member Function Documentation

bool Enemy::getDeletable ( )

Getter # deleteable

Returns
bool does the object need deleting.

Here is the caller graph for this function:

float Enemy::getSpeed ( )

Getter # speed

Returns
float the enemy's speed.

Here is the caller graph for this function:

int Enemy::getType ( )

Getter # type

Returns
int the type.

Here is the caller graph for this function:

void Enemy::setDeletable ( bool  inputDelete)

Setter # deleteable Sets if the object needs to be deleted.

Parameters
booldoes the object need deleting.

Here is the caller graph for this function:

void Enemy::setSpeed ( float  inputSpeed)

Setter # speed Sets the speed of the enemy.

Parameters
floatthe new speed.

Here is the caller graph for this function:

void Enemy::typeSetup ( )

Sets the type of the Enemy Uses the value of type to set up initial values for the Enemy

Here is the caller graph for this function:


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