This repository has been archived on 2025-06-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
LotoStatek/headers/Plansza.h
Andrii Solianyk 2f9e0ba236 Serduszka działają
do zrobienia jeszcze animacja uderzenia się w meteoryt (miganie) i wybuch statku przy uderzeniu się w meteoryt po raz trzeci
2024-12-06 12:24:39 +01:00

46 lines
1.1 KiB
C++

#ifndef PLANSZA_H
#define PLANSZA_H
#include "Meteor.h"
#include "RandomNumberGenerator.h"
#include "SFML/System/Clock.hpp"
#include "SFML/Graphics/RenderWindow.hpp"
#include "Size.h"
#include "Player.h"
#include "Background.h"
#include "AudioManager.h"
#include "Meteor.h"
#include "Plansza.h"
#include "Heart.hpp"
class Plansza {
public:
Plansza(unsigned int windowHeight,unsigned int windowWidth, sf::RenderWindow *mainWindow);
Size getSize();
std::vector<Meteor> &getMeteors();
void spawn_meteor();
void spawn_hearts();
void update_meteors();
void update_hearts();
void update();
private:
sf::RenderWindow *window;
Background background;
Player ship;
AudioManager audioManager;
Size size;
sf::Texture meteorTexture1;
sf::Texture meteorTexture2;
sf::Texture heartTexture;
sf::Texture heartTextureGray;
sf::Clock meteorSpawnClock;
sf::Clock heartSpawnClock;
std::vector<Meteor> meteors;
std::vector<Heart> hearts;
std::vector<sf::Sprite> heartStats;
bool gameOver = false;
};
#endif //PLANSZA_H