Meteory są w tym samym stanie co w poprzednim commit, tylko, że teraz są zdefiniowane w osobnej klasie "Plansza"
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user