-
Notifications
You must be signed in to change notification settings - Fork 0
/
World.h
57 lines (42 loc) · 1.11 KB
/
World.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef WORLD_CLASS_H
#define WORLD_CLASS_H
//#include <GLFW/glfw3.h>
#include "Circle.h"
#include "Camera.h"
#include "Rectangle.h"
#include "Primitives.h"
#include "PillarManager.h"
#include "NeuroEvolution.h"
class World {
Camera* camera;
Shader* shaderProgram;
Shader* selectShader;
Shader* shader1;
Shader* shader2;
Shader* shader3;
Primitives* primitives;
GLFWwindow& window;
// Neuroevolution object pointer
NeuroEvolution* neuroEvolution;
Rectangle* groundRectangle;
Rectangle* ceilRectangle;
PillarManager* pillarManager;
std::vector<Rectangle*> rects;
std::vector<Circle*> circles;
int lifeCount;
void clearCircles();
public:
const float gravity = -0.0025;
const float spawnInterval = 2.0f;
const float organismRadius = 0.15f;
bool ShouldPlayWorld = true;
World( GLFWwindow& window, int windowWidth, int windowHeight );
void Start();
void Update();
void Destroy();
bool IsDead();
void Restart();
void Initiate();
virtual ~World();
};
#endif