Flock You!
Main Page
Classes
Files
File List
File Members
•
All
Classes
Files
Functions
Variables
Flock You!
game.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <SDL.h>
4
#include <vector>
5
#include <time.h>
6
#include "
state.h
"
7
#include "
stateManager.h
"
8
#include "
texture.h
"
9
#include "
text.h
"
10
#include "
audio.h
"
11
#include "
boid.h
"
12
#include "
help.h
"
13
19
class
Game
:
public
State
20
{
21
private
:
22
/*a texture of a white square*/
23
Texture
*
whiteSquare
;
24
/*a vector of Boid objects*/
25
std::vector<Boid*>
boids
;
26
/*What to do with the rule (1 == possitve, 0 = neutral, -1 == negative)*/
27
int
applyRule1
,
applyRule2
,
applyRule3
;
28
/*rendered text*/
29
std::vector<Text *>
text
;
30
36
Vec2
rule1
(
int
);
37
43
Vec2
rule2
(
int
);
44
50
Vec2
rule3
(
int
);
51
57
Vec2
roughBoundaries
(
int
);
58
63
void
limitVelocity
(
int
);
64
65
public
:
73
Game
(
StateManager
*, SDL_Renderer *,
int
,
int
);
74
78
~Game
();
79
84
bool
input
();
85
91
void
update
(
float
deltaTime);
92
96
void
draw
();
97
};
Game::limitVelocity
void limitVelocity(int)
Definition:
game.cpp:324
audio.h
Game::~Game
~Game()
Definition:
game.cpp:29
State
Creates a State object. Creates a State object to be inherited.
Definition:
state.h:14
Game::text
std::vector< Text * > text
Definition:
game.h:29
text.h
Vec2
Creates an Vec2 structure with functions Creates an Vec2 structure with overloaded operators to creat...
Definition:
vec2.h:7
Game::whiteSquare
Texture * whiteSquare
Definition:
game.h:23
StateManager
Creates a StateManager object. Creates a StateManager object to be inherited.
Definition:
stateManager.h:10
texture.h
boid.h
Game::applyRule3
int applyRule3
Definition:
game.h:27
Game::applyRule1
int applyRule1
Definition:
game.h:27
Texture
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition:
texture.h:12
Game::input
bool input()
Definition:
game.cpp:45
Game::rule2
Vec2 rule2(int)
Definition:
game.cpp:225
Game
Creates an Game object that inherits State Creates an Game object that inherits State and runs the Ga...
Definition:
game.h:19
stateManager.h
help.h
state.h
Game::draw
void draw()
Definition:
game.cpp:168
Game::roughBoundaries
Vec2 roughBoundaries(int)
Definition:
game.cpp:286
Game::rule1
Vec2 rule1(int)
Definition:
game.cpp:194
Game::Game
Game(StateManager *, SDL_Renderer *, int, int)
Definition:
game.cpp:6
Game::boids
std::vector< Boid * > boids
Definition:
game.h:25
Game::rule3
Vec2 rule3(int)
Definition:
game.cpp:257
Game::applyRule2
int applyRule2
Definition:
game.h:27
Game::update
void update(float deltaTime)
Definition:
game.cpp:132
Generated on Mon Jun 1 2015 00:15:12 for Flock You! by
1.8.8