Added heart and spawn of them

This commit is contained in:
2024-12-05 14:52:00 +01:00
parent b6830c305b
commit 3b637508e1
5 changed files with 81 additions and 6 deletions

View File

@@ -12,6 +12,7 @@
#include "AudioManager.h"
#include "Meteor.h"
#include "Plansza.h"
#include "Heart.hpp"
class Plansza {
public:
@@ -19,7 +20,9 @@ public:
Size getSize();
std::vector<Meteor> &getMeteors();
void spawn_meteor();
void spawn_hearts();
void update_meteors();
void update_hearts();
void update();
private:
Size size;
@@ -28,9 +31,13 @@ private:
AudioManager audioManager;
sf::Texture meteorTexture1;
sf::Texture meteorTexture2;
sf::Clock spawnClock;
sf::Texture heartTexture;
sf::Clock meteorSpawnClock;
sf::Clock heartSpawnClock;
std::vector<Meteor> meteors;
std::vector<Heart> hearts;
sf::RenderWindow *window;
};
#endif //PLANSZA_H