Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces 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. DISCLAIMER - This code is from my PGG SDL Assignment. 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. DISCLAIMER - This code is from my PGG SDL Assignment.

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.

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.

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.

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: