🚀
This commit is contained in:
+36
-32
@@ -1,32 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include "Player.h"
|
||||
#include "Laser.h"
|
||||
#include "Shield.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace sf;
|
||||
|
||||
class GameManager
|
||||
{
|
||||
public:
|
||||
GameManager();
|
||||
|
||||
void run();
|
||||
void handleInputs();
|
||||
void handleLasersCollision();
|
||||
|
||||
private:
|
||||
Clock _clock;
|
||||
|
||||
//RenderWindow _window{ VideoMode::getFullscreenModes()[0], "Space Invader", Style::Fullscreen };
|
||||
RenderWindow _window{ VideoMode(1024, 800), "Space Invader", Style::Close | Style::Titlebar};
|
||||
|
||||
Player _player = { _window.getSize() };
|
||||
|
||||
vector<Laser*> _lasers;
|
||||
vector<Shield*> _shields;
|
||||
};
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include "Player.h"
|
||||
#include "Laser.h"
|
||||
#include "Shield.h"
|
||||
#include "Alien.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace sf;
|
||||
|
||||
class GameManager
|
||||
{
|
||||
public:
|
||||
GameManager();
|
||||
|
||||
void run();
|
||||
void handleInputs();
|
||||
void handleLasersCollision();
|
||||
|
||||
private:
|
||||
Clock _clock;
|
||||
|
||||
const int alienScreenMargin = 50;
|
||||
|
||||
//RenderWindow _window{ VideoMode::getFullscreenModes()[0], "Space Invader", Style::Fullscreen };
|
||||
RenderWindow _window{ VideoMode(1024, 800), "Space Invader", Style::Close | Style::Titlebar};
|
||||
|
||||
Player _player = { _window.getSize() };
|
||||
|
||||
vector<Laser*> _lasers;
|
||||
vector<Shield*> _shields;
|
||||
vector<Alien*> _aliens;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user