Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
S_Game Class Reference

A State that contains and runs the Game. More...

#include <S_Game.h>

Inheritance diagram for S_Game:
Inheritance graph
Collaboration diagram for S_Game:
Collaboration graph

Public Member Functions

 S_Game (S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions, C_Music *backgroundMusic)
 Constructs the Game State object. More...
 
 ~S_Game ()
 Destructs the Game State object. More...
 
bool input ()
 Handles the Game State input. More...
 
void update (float dt)
 A function to update the Game State. More...
 
void draw ()
 A function to draw the Game State to the screen. More...
 
- Public Member Functions inherited from S_State
 S_State (S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions)
 Constructs the State object. More...
 
virtual ~S_State ()
 A virtual destructor for the State object. More...
 

Private Member Functions

void resetGame ()
 A function to reset the Game. More...
 

Private Attributes

C_Vec2 mousePos
 The mouse position. More...
 
C_MusicbackgroundMusic
 The background music. More...
 
B_BackgroundManagerbackground
 The Background. More...
 
EP_Playerplayer
 The Player. More...
 
C_TextureplayerSprite
 The Player textures. More...
 
C_TextureplayerArcherSprite
 
E_EntityManagerentityManager
 The EntityManager. More...
 
G_Gameplaygameplay
 The Gameplay. More...
 
C_TexturescoreScroll
 The texture for the scoreScroll. More...
 
C_TexturehealthScroll
 The texture for the healthScroll. More...
 
C_TextnumOfCoins
 The number of coins text to be displayed. More...
 
C_TexturefireSprite
 The Fire Effect texture. More...
 
SDL_Colour minFireTint
 The min tint colour for use with the fire effect. More...
 
SDL_Colour maxFireTint
 The max tint colour for use with the fire effect. More...
 
float * universalSpeed
 A pointer for the universal speed of the game. More...
 
UI_ButtonfireArrowButton
 The fire arrow button. More...
 
UI_ButtonhelpButton
 The Help button. More...
 
C_TexturehelpButtonSpritesheet
 The help button spritesheet. More...
 
C_TexturefireArrowButtonSpritesheet
 The fire arrow button spritesheet. More...
 

Additional Inherited Members

- Protected Attributes inherited from S_State
S_StateManagerstateManager
 A pointer to the state manager. More...
 
SDL_Renderer * renderer
 A pointer to the renderer. More...
 
C_Vec2 dimensions
 The screen dimensions. More...
 

Detailed Description

A State that contains and runs the Game.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

S_Game::S_Game ( S_StateManager stateManager,
SDL_Renderer *  renderer,
C_Vec2  dimensions,
C_Music backgroundMusic 
)

Constructs the Game State object.

Parameters
stateManagerA pointer to the StateManager.
rendererA pointer to the renderer.
dimensionsThe screen dimensions.
backgroundMusicThe background music of the State.
S_Game::~S_Game ( )

Destructs the Game State object.

Member Function Documentation

void S_Game::draw ( )
virtual

A function to draw the Game State to the screen.

Implements S_State.

Here is the call graph for this function:

bool S_Game::input ( )
virtual

Handles the Game State input.

Returns
If false then quit the Game State.

Implements S_State.

Here is the call graph for this function:

void S_Game::resetGame ( )
private

A function to reset the Game.

Here is the caller graph for this function:

void S_Game::update ( float  dt)
virtual

A function to update the Game State.

Parameters
dtThe delta time.

Implements S_State.

Here is the call graph for this function:

Member Data Documentation

B_BackgroundManager* S_Game::background
private

The Background.

C_Music* S_Game::backgroundMusic
private

The background music.

E_EntityManager* S_Game::entityManager
private

The EntityManager.

UI_Button* S_Game::fireArrowButton
private

The fire arrow button.

C_Texture* S_Game::fireArrowButtonSpritesheet
private

The fire arrow button spritesheet.

C_Texture* S_Game::fireSprite
private

The Fire Effect texture.

G_Gameplay* S_Game::gameplay
private

The Gameplay.

C_Texture* S_Game::healthScroll
private

The texture for the healthScroll.

UI_Button* S_Game::helpButton
private

The Help button.

C_Texture* S_Game::helpButtonSpritesheet
private

The help button spritesheet.

SDL_Colour S_Game::maxFireTint
private

The max tint colour for use with the fire effect.

SDL_Colour S_Game::minFireTint
private

The min tint colour for use with the fire effect.

C_Vec2 S_Game::mousePos
private

The mouse position.

C_Text* S_Game::numOfCoins
private

The number of coins text to be displayed.

EP_Player* S_Game::player
private

The Player.

C_Texture* S_Game::playerArcherSprite
private
C_Texture* S_Game::playerSprite
private

The Player textures.

C_Texture* S_Game::scoreScroll
private

The texture for the scoreScroll.

float* S_Game::universalSpeed
private

A pointer for the universal speed of the game.


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