needed to push some big changes before I lose them
This commit is contained in:
parent
d84b2810d2
commit
d767806e1c
35 changed files with 637 additions and 138 deletions
12
main.cpp
12
main.cpp
|
|
@ -1,5 +1,6 @@
|
|||
#include <iostream> // for standard input/output
|
||||
#include <random>
|
||||
#include <chrono>
|
||||
using namespace std; // using the standard namespace
|
||||
|
||||
#include <SFML/Graphics.hpp> // include the SFML Graphics Library
|
||||
|
|
@ -8,6 +9,8 @@ using namespace std; // using the standard namespace
|
|||
using namespace sf; // using the sf namespace
|
||||
|
||||
#include "MySprite.h"
|
||||
#include "Rider.h"
|
||||
#include "Mount.h"
|
||||
#include "Ship.h"
|
||||
#include "Asteroid.h"
|
||||
#include "Menu.h"
|
||||
|
|
@ -15,12 +18,17 @@ using namespace sf; // using the sf namespace
|
|||
|
||||
int main() {
|
||||
bool play = true;
|
||||
Time mTime = Time::Zero;
|
||||
int loop = 0;
|
||||
|
||||
while (play) {
|
||||
Menu menu;
|
||||
Menu menu(loop, mTime);
|
||||
if (menu.result == EXIT_SUCCESS) {
|
||||
Game game;
|
||||
Game game(menu.musicPicked, menu.mTime);
|
||||
if (game.result == 1) play = false;
|
||||
|
||||
loop = game.loop;
|
||||
mTime = game.mTime;
|
||||
}
|
||||
else play = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue