From 43394c8a8908442982e3a7e25975c31b3c952923 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Sun, 27 Oct 2024 12:52:55 +0200 Subject: root --- src/game.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/game.h (limited to 'src/game.h') 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 -- cgit v1.2.3