-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameScreen.h
42 lines (32 loc) · 820 Bytes
/
GameScreen.h
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
38
39
40
41
#pragma once
#include "RLScreen.h"
using RustyLib::Framework::ScreenManagement::Screen;
#include "RLAABoundingBox.h"
using RustyLib::Physics::AABBox;
#include "Asteroid.h"
#include "Player.h"
class GameScreen : public Screen
{
private:
//Define the play region
AABBox play_region;
AABBox asteroid_spawn_region;
Player player;
//Asteroid vars
std::list<Asteroid*> asteroids;
int asteroid_spawn_side;//Iterates between 1 and 4 for each side
int MAX_ASTEROIDS;
float MAX_ASTEROID_SIZE;
float asteroid_spawn_countdown;
enum{LEFT,TOP,RIGHT,BOTTOM};
float ASTEROID_SPAWN_INTERVAL;
void SpawnAsteroid(void );
void RepositionAsteroid(Asteroid *ast);
public:
GameScreen(void);
~GameScreen(void);
Error Initialise(void );
Error Exit(void );
void Update(const float time_step);
void Render(void );
};