-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
50 lines (36 loc) · 953 Bytes
/
main.cpp
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
#include <iostream>
#include <raylib.h>
#include <string>
#include "commons/world.hpp"
#include "actors/smis.hpp"
const std::string VERSION="0.0.1";
const int NumberOfSMis = 15;
int main()
{
std::string windowName = "sMis G.O.A.P " + VERSION;
InitWindow(World::screenWidth, World::screenHeight, windowName.c_str());
SetTargetFPS(60);
SMis *sMis[NumberOfSMis] {};
for(int i = 0; i < NumberOfSMis; i++)
{
sMis[i] = new SMis(GetRandomValue(0, World::screenWidth), GetRandomValue(0, World::screenHeight));
}
while(!WindowShouldClose())
{
if (IsKeyPressed(KEY_F))
{
ToggleFullscreen();
}
BeginDrawing();
ClearBackground(BLACK);
for(auto s : sMis)
{
s->draw();
s->decideNextAction();
s->act();
}
EndDrawing();
}
CloseWindow();
return 0;
}