Jamie Slowgrove - PGG Assignment 2
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Macros
Assignment 2
Game.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <SDL.h>
4
#include <iostream>
5
#include <unordered_map>
6
#include <vector>
7
#include <time.h>
8
#include "
Utilities.h
"
9
#include "
State.h
"
10
#include "
StateManager.h
"
11
#include "
Audio.h
"
12
#include "
Camera.h
"
13
#include "
Entity.h
"
14
#include "
GameUI.h
"
15
#include "
LoadingScreen.h
"
16
#include "
Ring.h
"
17
#include "
Player.h
"
18
#include "
Ground.h
"
19
#include "
HelpUI.h
"
20
#include "
ParticleEffect.h
"
21
22
24
#define NUM_OF_TARGETS 30
25
30
class
Game
:
public
State
31
{
32
private
:
34
std::unordered_map<std::string, Object*>
objects
;
35
/*The loaded Shader files*/
36
std::unordered_map<std::string, Shader*>
shaders
;
38
Audio
*
music
;
40
Audio
*
ringPassed
;
42
Audio
*
ringMissed
;
44
std::vector<Ring*>
targetRings
;
46
Player
*
player
;
48
Ground
*
chapel
;
50
Ground
*
house
;
52
Ground
*
ground
;
54
Camera
*
camera
;
56
GameUI
*
userInterface
;
58
float
height
;
62
float
score
;
64
int
initialLoops
;
66
ParticleEffect
*
reachedEndEffect
;
68
float
timeSinceEnd
;
70
bool
ended
;
71
75
void
loadingScreen
();
76
80
void
resetGame
();
81
82
public
:
90
Game
(
StateManager
*
stateManager
, SDL_Window*
window
,
int
screenWidth
,
int
screenHeight
);
91
95
~Game
();
96
101
bool
input
();
102
107
void
update
(
float
dt);
108
112
void
draw
();
113
};
Game::ended
bool ended
Definition:
Game.h:70
Game::~Game
~Game()
Definition:
Game.cpp:118
Player.h
Ground
Creates a Ground object that inherits Entity.
Definition:
Ground.h:16
ParticleEffect
Creates a ParticleEffect object that handles Particle objects.
Definition:
ParticleEffect.h:22
State
Creates a State object. Creates a State object to be inherited. DISCLAMER - This is a modified versio...
Definition:
State.h:16
Game::loadingScreen
void loadingScreen()
Definition:
Game.cpp:360
Game::reachedEndEffect
ParticleEffect * reachedEndEffect
Definition:
Game.h:66
Game::shaders
std::unordered_map< std::string, Shader * > shaders
Definition:
Game.h:36
Game::camera
Camera * camera
Definition:
Game.h:54
Game::resetGame
void resetGame()
Definition:
Game.cpp:387
Game::update
void update(float dt)
Definition:
Game.cpp:195
HelpUI.h
ParticleEffect.h
StateManager
Creates a StateManager object. Creates a StateManager object to be inherited. DISCLAMER - This is my ...
Definition:
StateManager.h:13
Game::objects
std::unordered_map< std::string, Object * > objects
Definition:
Game.h:34
Game::player
Player * player
Definition:
Game.h:46
State::stateManager
StateManager * stateManager
Definition:
State.h:20
Game::score
float score
Definition:
Game.h:62
Entity.h
Camera
Creates an Camera object.
Definition:
Camera.h:14
Game::house
Ground * house
Definition:
Game.h:50
Game::initialLoops
int initialLoops
Definition:
Game.h:64
Game::ground
Ground * ground
Definition:
Game.h:52
Game::timeSinceEnd
float timeSinceEnd
Definition:
Game.h:68
State::window
SDL_Window * window
Definition:
State.h:22
Game::ringMissed
Audio * ringMissed
Definition:
Game.h:42
State::screenHeight
int screenHeight
Definition:
State.h:26
Utilities.h
Game::Game
Game(StateManager *stateManager, SDL_Window *window, int screenWidth, int screenHeight)
Definition:
Game.cpp:9
Game::input
bool input()
Definition:
Game.cpp:151
Game::height
float height
Definition:
Game.h:58
StateManager.h
Game
Creates an Game object that inherits State and runs the Game.
Definition:
Game.h:30
Game::targetRings
std::vector< Ring * > targetRings
Definition:
Game.h:44
Game::chapel
Ground * chapel
Definition:
Game.h:48
Game::draw
void draw()
Definition:
Game.cpp:329
Ground.h
GameUI
A class for the 2D GameUI that inherits UI.
Definition:
GameUI.h:14
Ring.h
Camera.h
State::screenWidth
int screenWidth
Definition:
State.h:24
Player
Creates a Player object that inherits Entity.
Definition:
Player.h:22
State.h
Audio.h
GameUI.h
LoadingScreen.h
Game::ringPassed
Audio * ringPassed
Definition:
Game.h:40
Audio
Creates a Audio object to handle the SDL_Mixer.
Definition:
Audio.h:12
Game::userInterface
GameUI * userInterface
Definition:
Game.h:56
Game::music
Audio * music
Definition:
Game.h:38
Generated on Fri May 15 2015 23:26:22 for Jamie Slowgrove - PGG Assignment 2 by
1.8.8