Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Game Class Reference

Creates a Game object that inherits State Creates a Game object that inherits State and runs the Game. More...

#include <game.h>

Inheritance diagram for Game:
Inheritance graph
Collaboration diagram for Game:
Collaboration graph

Public Member Functions

 Game (StateManager *, SDL_Renderer *, int, int)
 
 ~Game ()
 
bool input ()
 
void update (float deltaTime)
 
void draw ()
 
- Public Member Functions inherited from State
 State (StateManager *, SDL_Renderer *, int, int)
 
virtual ~State ()
 

Private Member Functions

void drawText ()
 

Private Attributes

Texturebackground
 
Texturespritesheet
 
Mapmap
 
Playerplayer
 
BotAbotA
 
BotBbotB
 
bool developer
 
bool showCollisions
 
bool showLOS
 
bool showAStar
 
bool firstRun
 
std::vector< Text * > text
 
Audiomusic
 
bool playMusic
 

Additional Inherited Members

- Protected Attributes inherited from State
StateManagerstateManager
 
SDL_Renderer * renderer
 
int screenWidth
 
int screenHeight
 

Detailed Description

Creates a Game object that inherits State Creates a Game object that inherits State and runs the Game.

Constructor & Destructor Documentation

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

Constructs a Game object

Parameters
StateManager* a pointer to the StateManager
SDL_Renderer* a pointer to the renderer
intthe screen width
intthe screen height

Here is the call graph for this function:

Game::~Game ( )

Destructs a Game object

Here is the call graph for this function:

Member Function Documentation

void Game::draw ( )
virtual

A function to draw to the screen

Implements State.

Here is the call graph for this function:

void Game::drawText ( )
private

A function to draw the text

Here is the call graph for this function:

Here is the caller graph for this function:

bool Game::input ( )
virtual

Handles the Game input

Returns
bool if false the quit the Game State

Implements State.

Here is the call graph for this function:

void Game::update ( float  deltaTime)
virtual

A function to update the Game A function to update the Game to allow the Game to run

Parameters
floatthe delta time

Implements State.

Here is the call graph for this function:

Member Data Documentation

Texture* Game::background
private

Texture pointers

BotA* Game::botA
private
BotB* Game::botB
private
bool Game::developer
private
bool Game::firstRun
private
Map* Game::map
private

Entity pointers

Audio* Game::music
private
Player* Game::player
private
bool Game::playMusic
private
bool Game::showAStar
private
bool Game::showCollisions
private
bool Game::showLOS
private
Texture* Game::spritesheet
private
std::vector<Text *> Game::text
private

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