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

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

#include <gem.h>

Inheritance diagram for Gem:
Inheritance graph
Collaboration diagram for Gem:
Collaboration graph

Public Member Functions

 Gem (Texture *, float, float, int)
 
 ~Gem ()
 
void typeSetup ()
 
int getValue ()
 
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 Gem object that inherits MapObject.

Constructor & Destructor Documentation

Gem::Gem ( Texture inputTexture,
float  inputX,
float  inputY,
int  inType 
)

Constructs a Gem object Constructs the Gem object.

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

Here is the call graph for this function:

Gem::~Gem ( )

De-constructs a Gem object De-constructs the Gem object

Member Function Documentation

int Gem::getType ( )

Getter # type

Returns
int the type.

Here is the caller graph for this function:

int Gem::getValue ( )

Getter # value

Returns
int the value of the gem.

Here is the caller graph for this function:

void Gem::typeSetup ( )

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

Here is the caller graph for this function:


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