Refactor of structs

Refactored Size and Position
Placed them in different .h files
This commit is contained in:
2024-12-04 14:47:50 +01:00
parent 7ecb90af1f
commit 72e2116dc7
9 changed files with 35 additions and 28 deletions

View File

@@ -1,28 +1,24 @@
#ifndef PLANSZA_H
#define PLANSZA_H
#include "Meteor.h"
#include "RandomNumberGenerator.h"
#include "SFML/System/Clock.hpp"
#include "Size.h"
class Plansza {
struct Size {
int height;
int width;
};
public:
Plansza(unsigned int windowHeight, unsigned int windowWidth);
void spawn_meteor();
Size getSize();
std::vector<Meteor> &getMeteors();
void spawn_meteor();
void update_meteors();
private:
std::vector<Meteor> meteors;
Size size;
sf::Texture meteorTexture1;
sf::Texture meteorTexture2;
sf::Clock spawnClock;
std::vector<Meteor> meteors;
};
#endif //PLANSZA_H