Caseus Tower
 All Classes Namespaces Files Functions Variables
game.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <time.h>
5 #include "state.h"
6 #include "spriteHandler.h"
7 #include "entity.h"
8 #include "player.h"
9 #include "collision.h"
10 #include "animation.h"
11 #include "audio.h"
12 
17 class Game : public State
18 {
19 private:
25  std::vector<Entity *> background;
26  std::vector<Entity *> safePlatforms;
27  std::vector<Entity *> dangerPlatforms;
33  std::vector<Animation *> platformAnim;
41  int score;
44  float gravity;
46  bool pressed;
47 
51  void displayScore();
52 
58  void generatePlatforms(float);
59 
60 public:
68  Game(StateManager *, SpriteHandler*, int, int);
69 
73  ~Game();
74 
81  void update(float,float,float);
82 
86  void drawSprites();
87 
91  void drawSpritesWithAlpha();
92 };
93 
Creates an Animation object Creates an Animation object to handle the timing of when an Animation sho...
Definition: animation.h:8
int exitSprite
Definition: game.h:39
Creates an State object Creates an State object with virtual functions and the SpriteHandler * and wi...
Definition: state.h:12
std::vector< Entity * > safePlatforms
Definition: game.h:26
void update(float, float, float)
void drawSprites()
Creates a StateManager object. Creates a StateManager object to be inherited. DISCLAMER - This is a m...
Definition: stateManager.h:11
Player * player
Definition: game.h:31
int pauseSprite
Definition: game.h:37
Animation * buttonPress
Definition: game.h:34
Game(StateManager *, SpriteHandler *, int, int)
Audio * jumpSafe
Definition: game.h:22
void generatePlatforms(float)
void displayScore()
int highestScore
Definition: game.h:42
Creates an Entity object Creates an Entity object with all the information about the Entity...
Definition: entity.h:7
Entity * pauseButton
Definition: game.h:28
std::vector< Animation * > platformAnim
Definition: game.h:33
float gravity
Definition: game.h:44
std::vector< Entity * > background
Definition: game.h:25
int score
Definition: game.h:41
Audio * jumpDanger
Definition: game.h:23
Entity * exitButton
Definition: game.h:30
Creates an SpriteHandler object Creates an SpriteHandler object to deal with all of the applications ...
Definition: spriteHandler.h:12
Creates an Game object Creates an Game object which inherits State.
Definition: game.h:17
Entity * playButton
Definition: game.h:29
void drawSpritesWithAlpha()
bool pressed
Definition: game.h:46
Creates an Player object that inherits Entity Creates an Player object that inherits Entity with a x ...
Definition: player.h:9
Animation * playerAnim
Definition: game.h:35
std::vector< Entity * > dangerPlatforms
Definition: game.h:27
int playSprite
Definition: game.h:38
Creates a Audio object to handle the SDL_Mixer.
Definition: audio.h:10
Audio * music
Definition: game.h:21