diff options
Diffstat (limited to 'src/game.h')
-rw-r--r-- | src/game.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/game.h b/src/game.h new file mode 100644 index 0000000..691e6a7 --- /dev/null +++ b/src/game.h @@ -0,0 +1,37 @@ +#pragma once + +#include "gameobject.h" +#include "player.h" + +using namespace std; + +class Game { + + int game_state, object_counter, score; + float last_enemy_spawn_time, last_kamikaze_spawn_time; + float game_time_started, pressed_space; + GameObject * game_objects[1000]; + Player * player; + + void updateStartScreen(); + void drawStartScreen(); + + void updateGame(); + void drawGame(); + + void updateGameOverScreen(); + void drawGameOverScreen(); + + bool checkCollision(GameObject * ob1, GameObject * ob2); + +public: + + Game(); + ~Game(); + + void update(); + void draw(); + + void addObject(GameObject * object); + +};
\ No newline at end of file |