Migrated the whole main loop

The main loop of the game is now contained in Plansza class
This commit is contained in:
2024-12-04 22:12:30 +01:00
parent 5eda245ccc
commit 9d4af21d4d
4 changed files with 149 additions and 163 deletions

View File

@@ -7,6 +7,7 @@
class AudioManager {
public:
AudioManager() = default;
bool loadBackgroundMusic(const std::string& filePath);
void playBackgroundMusic(float volume = 50.f, bool loop = true);
void stopBackgroundMusic();

View File

@@ -15,8 +15,7 @@
class Plansza {
public:
Plansza(unsigned int windowHeight, unsigned int windowWidth);
Plansza(unsigned int windowHeight, unsigned int windowWidth, sf::RenderWindow *mainWindow);
Plansza(unsigned int windowHeight,unsigned int windowWidth, sf::RenderWindow *mainWindow);
Size getSize();
std::vector<Meteor> &getMeteors();
void spawn_meteor();