Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Game.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <vector>
5 #include "JAM/State.h"
6 #include "JAM/StateManager.h"
7 #include "JAM/Texture.h"
8 #include "JAM/Audio.h"
9 #include "JAM/Text.h"
10 #include "JAM/Flocking.h"
11 #include "JAM/Utilities.h"
12 #include "JAM/Button.h"
13 
18 class Game : public JAM_State
19 {
20 private:
28  std::vector<JAM_Text*> text;
29  /*What to do with the rule. (1 == possitve, 0 = neutral, -1 == negative)*/
32  std::vector<JAM_Button*> buttons;
33 
39  bool windowsInput(SDL_Event& incomingEvent);
40 
46  bool androidInput(SDL_Event& incomingEvent);
47 
48 public:
57 
61  ~Game();
62 
67  bool input();
68 
74  void update(float dt);
75 
79  void draw();
80 };
JAM_Flocking * flocking
Definition: Game.h:24
~Game()
Definition: Game.cpp:139
Creates a State object. Creates a State object to be inherited.
Definition: State.h:15
SDL_Renderer * renderer
Definition: State.h:21
bool androidInput(SDL_Event &incomingEvent)
Definition: Game.cpp:259
JAM_Texture * boidTexture
Definition: Game.h:26
Creates a Texture for use with a renderer. Creates a Texture from an image file, this can then be use...
Definition: Texture.h:13
void update(float dt)
Definition: Game.cpp:281
std::vector< JAM_Button * > buttons
Definition: Game.h:32
Creates a StateManager object. Creates a StateManager object to be inherited.
Definition: StateManager.h:13
int applyRule3
Definition: Game.h:30
int applyRule1
Definition: Game.h:30
std::vector< JAM_Text * > text
Definition: Game.h:28
Creates a Flocking object.
Definition: Flocking.h:16
bool input()
Definition: Game.cpp:161
Creates an Game object that inherits State and runs the Game.
Definition: Game.h:18
int current
Definition: Game.h:30
Game(JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
Definition: Game.cpp:7
bool windowsInput(SDL_Event &incomingEvent)
Definition: Game.cpp:237
void draw()
Definition: Game.cpp:341
int screenWidth
Definition: State.h:23
JAM_StateManager * stateManager
Definition: State.h:19
int screenHeight
Definition: State.h:25
int applyRule2
Definition: Game.h:30
JAM_Audio * music
Definition: Game.h:22
Creates an Audio object to handle the SDL_Mixer.
Definition: Audio.h:12