Caseus Tower
 All Classes Namespaces Files Functions Variables
State Class Referenceabstract

Creates an State object Creates an State object with virtual functions and the SpriteHandler * and width and height variables. More...

#include <state.h>

Inheritance diagram for State:
Credits Game Lose Menu Pause

Public Member Functions

 State (StateManager *, SpriteHandler *, int, int)
 
virtual ~State ()
 
virtual void update (float, float, float)=0
 
virtual void drawSprites ()=0
 
virtual void drawSpritesWithAlpha ()=0
 
std::string GetStateName ()
 
bool runProgram ()
 

Protected Attributes

StateManagerstateManager
 
int screenWidth
 
int screenHeight
 
SpriteHandlersprites
 
std::string name
 
bool runCheck
 

Detailed Description

Creates an State object Creates an State object with virtual functions and the SpriteHandler * and width and height variables.

Definition at line 12 of file state.h.

Constructor & Destructor Documentation

State::State ( StateManager ,
SpriteHandler ,
int  ,
int   
)

Constructs a State object

Parameters
StateManager* a pointer to the StateManager
SpriteHandler*a pointer to the SpriteHandler.
intthe screen width.
intthe screen height.
virtual State::~State ( )
virtual

A virtual destructor for the State object

Member Function Documentation

virtual void State::drawSprites ( )
pure virtual

A pure virtual function for displaying the Sprite objects which do not use alpha.

Implemented in Game, Lose, Menu, Pause, and Credits.

virtual void State::drawSpritesWithAlpha ( )
pure virtual

A pure virtual function for displaying the Sprite objects which do use alpha.

Implemented in Game, Lose, Menu, Pause, and Credits.

std::string State::GetStateName ( )

Getter # State name

Returns
std::string the name of the State.
bool State::runProgram ( )

Getter # runCheck

Returns
bool if the program should run.
virtual void State::update ( float  ,
float  ,
float   
)
pure virtual

A pure virtual function for updating the State object

Parameters
floatthe delta time
floatthe x touch location
floatthe y touch location

Implemented in Game, Lose, Menu, Pause, and Credits.

Member Data Documentation

std::string State::name
protected

Definition at line 23 of file state.h.

bool State::runCheck
protected

Definition at line 25 of file state.h.

int State::screenHeight
protected

Definition at line 19 of file state.h.

int State::screenWidth
protected

the screen dimensions

Definition at line 18 of file state.h.

SpriteHandler* State::sprites
protected

Definition at line 21 of file state.h.

StateManager* State::stateManager
protected

Definition at line 16 of file state.h.


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