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

Creates a GameState object. Creates a GameState object that inherits State. More...

#include <gameState.h>

Inheritance diagram for GameState:
Inheritance graph
Collaboration diagram for GameState:
Collaboration graph

Public Member Functions

 GameState (StateManager *, SDL_Renderer *)
 
 ~GameState ()
 
bool HandleSDLEvents ()
 
void Update (float deltaTime)
 
void Draw ()
 
void displayScore ()
 
void updateScene (float, bool)
 
- Public Member Functions inherited from State
 State (StateManager *, SDL_Renderer *)
 
virtual ~State ()
 
std::string GetStateName ()
 

Additional Inherited Members

- Protected Attributes inherited from State
StateManagerstateManager
 
SDL_Renderer * renderer
 
std::string name
 

Detailed Description

Creates a GameState object. Creates a GameState object that inherits State.

Constructor & Destructor Documentation

GameState::GameState ( StateManager inStateManager,
SDL_Renderer *  inRenderer 
)

Constructs a GameState object Constructs a GameState object

Parameters
StateManager* a pointer to the StateManager
SDL_Renderer* a pointer to the renderer in use.

Here is the call graph for this function:

GameState::~GameState ( )

De-constructs a GameState object De-constructs the GameState object

Here is the call graph for this function:

Member Function Documentation

void GameState::displayScore ( )

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

Here is the call graph for this function:

Here is the caller graph for this function:

void GameState::Draw ( )
virtual

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

Implements State.

Here is the call graph for this function:

bool GameState::HandleSDLEvents ( )
virtual

A function to handle the SDL events A function to handle the SDL events for use with the GameState

Returns
bool if false then quit GameState

Implements State.

Here is the call graph for this function:

void GameState::Update ( float  deltaTime)
virtual

A function to update the GameState A function to update the GameState to allow the GameState to run

Parameters
floatthe delta time

Implements State.

Here is the call graph for this function:

void GameState::updateScene ( float  velocity,
bool  moveable 
)

A function to update the entire scene Updates the scenes velocity using the inputed velocity

Parameters
floatthe new velocity
boolif moveable

Here is the call graph for this function:

Here is the caller graph for this function:


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