Flock You!
 All Classes Files Functions Variables
Public Member Functions | Protected Attributes | List of all members
State Class Referenceabstract

Creates a State object. Creates a State object to be inherited. More...

#include <state.h>

Inheritance diagram for State:
Inheritance graph
Collaboration diagram for State:
Collaboration graph

Public Member Functions

 State (StateManager *, SDL_Renderer *, int, int)
 
virtual ~State ()
 
virtual bool input ()=0
 
virtual void update (float deltaTime)=0
 
virtual void draw ()=0
 

Protected Attributes

StateManagerstateManager
 
SDL_Renderer * renderer
 
int screenWidth
 
int screenHeight
 

Detailed Description

Creates a State object. Creates a State object to be inherited.

Constructor & Destructor Documentation

State::State ( StateManager inStateManager,
SDL_Renderer *  inRenderer,
int  inWidth,
int  inHeight 
)

Constructs a State object

Parameters
StateManager* a pointer to the StateManager
SDL_Renderer* a pointer to the renderer in use.
intthe screen width
intthe screen height
State::~State ( )
virtual

A virtual destructor for the State object

Member Function Documentation

virtual void State::draw ( )
pure virtual

A virtual function to draw to the screen A virtual function to draw to the screen using the renderer

Implemented in Game, and Help.

virtual bool State::input ( )
pure virtual

A virtual function to handle the user input A virtual function to handle the user input for use with the State

Returns
bool if false then quit State

Implemented in Game, and Help.

virtual void State::update ( float  deltaTime)
pure virtual

A virtual function to update the State A virtual function to update the State to allow the State to run

Parameters
floatthe delta time

Implemented in Game, and Help.

Member Data Documentation

SDL_Renderer* State::renderer
protected
int State::screenHeight
protected
int State::screenWidth
protected
StateManager* State::stateManager
protected

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