Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Game Class Reference

Creates an 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 (JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
 
 ~Game ()
 
bool input ()
 
void update (float dt)
 
void draw ()
 
- Public Member Functions inherited from JAM_State
 JAM_State (JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
 
virtual ~JAM_State ()
 

Private Member Functions

bool windowsInput (SDL_Event &incomingEvent)
 
bool androidInput (SDL_Event &incomingEvent)
 

Private Attributes

JAM_Audiomusic
 
JAM_Flockingflocking
 
JAM_TextureboidTexture
 
std::vector< JAM_Text * > text
 
int applyRule1
 
int applyRule2
 
int applyRule3
 
int current
 
std::vector< JAM_Button * > buttons
 

Additional Inherited Members

- Protected Attributes inherited from JAM_State
JAM_StateManagerstateManager
 
SDL_Renderer * renderer
 
int screenWidth
 
int screenHeight
 

Detailed Description

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

Author
Jamie Slowgrove

Constructor & Destructor Documentation

Game::Game ( JAM_StateManager stateManager,
SDL_Renderer *  renderer,
int  screenWidth,
int  screenHeight 
)

Constructs the Game object.

Parameters
stateManagerA pointer to the StateManager.
rendererA pointer to the renderer.
screenWidthThe screen width.
screenHeightThe screen height.

Here is the call graph for this function:

Game::~Game ( )

Destructs the Game object.

Here is the call graph for this function:

Member Function Documentation

bool Game::androidInput ( SDL_Event &  incomingEvent)
private

Handles the Android Game input.

Parameters
incomingEventA reference to the incoming SDL event.
Returns
If false then quit the Game State.

Here is the caller graph for this function:

void Game::draw ( )
virtual

A function to draw to the screen.

Implements JAM_State.

Here is the call graph for this function:

bool Game::input ( )
virtual

Handles the Game input.

Returns
If false then quit the Game State.

Implements JAM_State.

Here is the call graph for this function:

void Game::update ( float  dt)
virtual

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

Parameters
dtThe delta time.

Implements JAM_State.

Here is the call graph for this function:

bool Game::windowsInput ( SDL_Event &  incomingEvent)
private

Handles the Windows Game input.

Parameters
incomingEventA reference to the incoming SDL event.
Returns
If false then quit the Game State.

Here is the caller graph for this function:

Member Data Documentation

int Game::applyRule1
private
int Game::applyRule2
private
int Game::applyRule3
private
JAM_Texture* Game::boidTexture
private

A pointer for the boids texture.

std::vector<JAM_Button*> Game::buttons
private

The Buttons.

int Game::current
private
JAM_Flocking* Game::flocking
private

A pointer to a Flocking object.

JAM_Audio* Game::music
private

A pointer to the background music.

std::vector<JAM_Text*> Game::text
private

The Text.


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