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

Creates a Block object that inherits MapObject. More...

#include <block.h>

Inheritance diagram for Block:
Inheritance graph
Collaboration diagram for Block:
Collaboration graph

Public Member Functions

 Block (Texture *, float, float, int, int)
 
 ~Block ()
 
void typeSetup (int)
 
int getType ()
 
- Public Member Functions inherited from MapObject
 MapObject (Texture *, float, float)
 
 ~MapObject ()
 
void setCollidable (bool)
 
bool getCollidable ()
 
void setDamaging (bool)
 
bool getDamaging ()
 
void setDeletable (bool)
 
bool getDeletable ()
 
void setVelocity (float)
 
void updateX (float)
 
float getVelocity ()
 
- 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 ()
 

Additional Inherited Members

- Protected Attributes inherited from MapObject
bool collidable
 
bool damaging
 
bool deleteable
 
float velocity
 
int minX
 
int maxX
 
bool moveable
 
- 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 Block object that inherits MapObject.

Constructor & Destructor Documentation

Block::Block ( Texture inputTexture,
float  inputX,
float  inputY,
int  inType,
int  backgroundType 
)

Constructs a Block object Constructs the Block object.

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

Here is the call graph for this function:

Block::~Block ( )

De-constructs a Block object De-constructs the Block object

Member Function Documentation

int Block::getType ( )

Getter # type

Returns
int the type.

Here is the caller graph for this function:

void Block::typeSetup ( int  backgroundType)

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

Parameters
intthe type of background.

Here is the caller graph for this function:


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