Caseus Tower
 All Classes Namespaces Files Functions Variables
Menu Class Reference

Creates an Menu object Creates an Menu object which inherits State. More...

#include <menu.h>

Inheritance diagram for Menu:
State

Public Member Functions

 Menu (StateManager *, SpriteHandler *, int, int)
 
 ~Menu ()
 
void update (float, float, float)
 
void drawSprites ()
 
void drawSpritesWithAlpha ()
 
- Public Member Functions inherited from State
 State (StateManager *, SpriteHandler *, int, int)
 
virtual ~State ()
 
std::string GetStateName ()
 
bool runProgram ()
 

Private Attributes

Audiomusic
 
std::vector< Entity * > buttons
 
bool pressed
 
AnimationbuttonPress
 
int playSprite
 
int creditSprite
 
int exitSprite
 
int selected
 

Additional Inherited Members

- Protected Attributes inherited from State
StateManagerstateManager
 
int screenWidth
 
int screenHeight
 
SpriteHandlersprites
 
std::string name
 
bool runCheck
 

Detailed Description

Creates an Menu object Creates an Menu object which inherits State.

Definition at line 16 of file menu.h.

Constructor & Destructor Documentation

Menu::Menu ( StateManager ,
SpriteHandler ,
int  ,
int   
)

Constructs a Menu object

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

A destructor for the Menu object

Member Function Documentation

void Menu::drawSprites ( )
virtual

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

Implements State.

void Menu::drawSpritesWithAlpha ( )
virtual

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

Implements State.

void Menu::update ( float  ,
float  ,
float   
)
virtual

A function for updating the Menu object

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

Implements State.

Member Data Documentation

Animation* Menu::buttonPress
private

The Animation timer for the button press

Definition at line 26 of file menu.h.

std::vector<Entity *> Menu::buttons
private

The buttons

Definition at line 22 of file menu.h.

int Menu::creditSprite
private

Definition at line 28 of file menu.h.

int Menu::exitSprite
private

Definition at line 28 of file menu.h.

Audio* Menu::music
private

Audio

Definition at line 20 of file menu.h.

int Menu::playSprite
private

Definition at line 28 of file menu.h.

bool Menu::pressed
private

boolean for if a button is pressed

Definition at line 24 of file menu.h.

int Menu::selected
private

Definition at line 30 of file menu.h.


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