summaryrefslogtreecommitdiff
path: root/src/game.h
diff options
context:
space:
mode:
authorNikolas <nikolas@boutalas.com>2024-10-27 12:52:55 +0200
committerNikolas <nikolas@boutalas.com>2024-10-27 12:52:55 +0200
commit43394c8a8908442982e3a7e25975c31b3c952923 (patch)
tree2facd563e29f48fe3b0653ac5c113998940b4d5e /src/game.h
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h37
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