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_TexturealienDude
 
JAM_TexturebackgroundStars
 
JAM_TextureforceField
 
BackgroundstarsA
 
BackgroundstarsB
 
Playerplayer
 
std::vector< JAM_ParticleEffect * > particleEffects
 
std::vector< ForceField * > forceFields
 
JAM_Audiomusic
 
int initalLoops
 
JAM_Textinfo
 
JAM_Buttonbutton
 
JAM_ArrowPadarrowPad
 

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 call graph for this function:

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 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 call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

JAM_Texture* Game::alienDude
private

The alien Texture.

JAM_ArrowPad* Game::arrowPad
private

The arrow pad.

JAM_Texture* Game::backgroundStars
private

The background stars Texture.

JAM_Button* Game::button
private

The info Button.

JAM_Texture* Game::forceField
private

The force field Texture.

std::vector<ForceField*> Game::forceFields
private

A Vector for the ForceFields.

JAM_Text* Game::info
private

The info Text.

int Game::initalLoops
private

A number for the initial loops left.

JAM_Audio* Game::music
private

A pointer to the background music.

std::vector<JAM_ParticleEffect*> Game::particleEffects
private

A Vector for the ParticleEffect.

Player* Game::player
private

The Player Entity.

Background* Game::starsA
private

The first stars background.

Background* Game::starsB
private

The second stars background.


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