summaryrefslogtreecommitdiff
path: root/src/game.h
blob: 691e6a73e71aa427aaf3546b41c6518d815b5f56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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);

};