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/Utilities.h"
10 #include "JAM/Button.h"
11 #include "JAM/Text.h"
12 
17 class Game : public JAM_State
18 {
19 private:
21  std::vector<JAM_Button*> buttons;
27  bool playing;
29  std::vector<JAM_Text*> text;
30 
36  bool windowsInput(SDL_Event& incomingEvent);
37 
43  bool androidInput(SDL_Event& incomingEvent);
44 
45 public:
54 
58  ~Game();
59 
64  bool input();
65 
70  void update(float dt);
71 
75  void draw();
76 };
~Game()
Definition: Game.cpp:65
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:166
bool playing
Definition: Game.h:27
void update(float dt)
Definition: Game.cpp:188
std::vector< JAM_Button * > buttons
Definition: Game.h:21
Creates a StateManager object. Creates a StateManager object to be inherited.
Definition: StateManager.h:13
std::vector< JAM_Text * > text
Definition: Game.h:29
bool input()
Definition: Game.cpp:86
Creates an Game object that inherits State and runs the Game.
Definition: Game.h:17
Game(JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
Definition: Game.cpp:7
bool windowsInput(SDL_Event &incomingEvent)
Definition: Game.cpp:143
void draw()
Definition: Game.cpp:201
int screenWidth
Definition: State.h:23
JAM_Audio * soundEffect
Definition: Game.h:25
JAM_StateManager * stateManager
Definition: State.h:19
int screenHeight
Definition: State.h:25
JAM_Audio * music
Definition: Game.h:23
Creates an Audio object to handle the SDL_Mixer.
Definition: Audio.h:12