30 lines
578 B
C++
30 lines
578 B
C++
#ifndef PLANSZA_H
|
|
#define PLANSZA_H
|
|
|
|
|
|
#include "Meteor.h"
|
|
#include "RandomNumberGenerator.h"
|
|
#include "SFML/System/Clock.hpp"
|
|
|
|
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;
|
|
unsigned int meteorsCounter;
|
|
sf::Clock spawnClock;
|
|
};
|
|
|
|
#endif //PLANSZA_H
|