Meteory są w tym samym stanie co w poprzednim commit, tylko, że teraz są zdefiniowane w osobnej klasie "Plansza"

This commit is contained in:
2024-11-20 14:01:43 +01:00
parent cf10a042c0
commit 1cd9f9b950
8 changed files with 84 additions and 39 deletions

View File

@@ -2,11 +2,25 @@
#define PLANSZA_H
#include "Meteor.h"
#include "RandomNumberGenerator.h"
class Plansza {
struct Size {
int height;
int width;
};
public:
Plansza(int windowHeight, int windowWidth);
void spawn_meteor();
Size getSize();
std::vector<Meteor> &getMeteors();
void update_meteors();
private:
std::vector<Meteor> meteors;
Size size;
sf::Texture meteorTexture;
RandomNumberGenerator random;
};
#endif //PLANSZA_H