This repository has been archived on 2025-06-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
LotoStatek/headers/Plansza.h
Andrii Solianyk 9d4af21d4d Migrated the whole main loop
The main loop of the game is now contained in Plansza class
2024-12-04 22:12:30 +01:00

37 lines
822 B
C++

#ifndef PLANSZA_H
#define PLANSZA_H
#include "Meteor.h"
#include "RandomNumberGenerator.h"
#include "SFML/System/Clock.hpp"
#include "SFML/Graphics/RenderWindow.hpp"
#include "Size.h"
#include "Player.h"
#include "Background.h"
#include "AudioManager.h"
#include "Meteor.h"
#include "Plansza.h"
class Plansza {
public:
Plansza(unsigned int windowHeight,unsigned int windowWidth, sf::RenderWindow *mainWindow);
Size getSize();
std::vector<Meteor> &getMeteors();
void spawn_meteor();
void update_meteors();
void update();
private:
Size size;
Background background;
Player ship;
AudioManager audioManager;
sf::Texture meteorTexture1;
sf::Texture meteorTexture2;
sf::Clock spawnClock;
std::vector<Meteor> meteors;
sf::RenderWindow *window;
};
#endif //PLANSZA_H