Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
game.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include "state.h"
5 #include "stateManager.h"
6 #include "texture.h"
7 #include "audio.h"
8 #include "text.h"
9 #include "map.h"
10 #include "wall.h"
11 #include "player.h"
12 #include "botA.h"
13 #include "botB.h"
14 #include "lineOfSight.h"
15 
20 class Game : public State
21 {
22 private:
27  Map* map;
31  /*developer mode*/
32  bool developer;
34  bool showLOS;
35  bool showAStar;
36  /*bool to make the game not update on first loop (Fixes Bugs)*/
37  bool firstRun;
38  /*rendered text*/
39  std::vector<Text *> text;
40  /*background music*/
42  /*if the music should play*/
43  bool playMusic;
44 
48  void drawText();
49 
50 public:
58  Game(StateManager *, SDL_Renderer *, int, int);
59 
63  ~Game();
64 
69  bool input();
70 
76  void update(float deltaTime);
77 
81  void draw();
82 };
~Game()
Definition: game.cpp:56
Creates a State object. Creates a State object to be inherited. DISCLAIMER - This code is from my PGG...
Definition: state.h:15
Texture * spritesheet
Definition: game.h:25
std::vector< Text * > text
Definition: game.h:39
void drawText()
Definition: game.cpp:321
Creates a StateManager object. Creates a StateManager object to be inherited. DISCLAIMER - This code ...
Definition: stateManager.h:11
Player * player
Definition: game.h:28
BotA * botA
Definition: game.h:29
bool showLOS
Definition: game.h:34
Map * map
Definition: game.h:27
bool developer
Definition: game.h:32
Texture * background
Definition: game.h:24
BotB * botB
Definition: game.h:30
bool showCollisions
Definition: game.h:33
Creates a Map object.
Definition: map.h:13
Creates a BotB object that inherits BotAI. Creates a BotB object that inherits BotAI and contains the...
Definition: botB.h:13
bool firstRun
Definition: game.h:37
Creates a BotA object that inherits BotAI. Creates a BotA object that inherits BotAI and contains the...
Definition: botA.h:12
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition: texture.h:13
bool input()
Definition: game.cpp:77
Creates a Game object that inherits State Creates a Game object that inherits State and runs the Game...
Definition: game.h:20
void draw()
Definition: game.cpp:231
bool playMusic
Definition: game.h:43
Game(StateManager *, SDL_Renderer *, int, int)
Definition: game.cpp:6
bool showAStar
Definition: game.h:35
Creates a Player object that inherits Creature. Creates a Player object that inherits Creature and co...
Definition: player.h:12
void update(float deltaTime)
Definition: game.cpp:172
Creates an Audio object to handle the SDL_Mixer. DISCLAIMER - This code is from my PGG SDL Assignment...
Definition: audio.h:11
Audio * music
Definition: game.h:41