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
2024-12-10 20:20:05 +01:00

59 lines
1.4 KiB
C++

#ifndef PLANSZA_H
#define PLANSZA_H
#include "Meteor.h"
#include "Enemy.h"
#include "AdvancedEnemy.h"
#include "RandomNumberGenerator.h"
#include "SFML/System/Clock.hpp"
#include "SFML/Graphics/RenderWindow.hpp"
#include "Size.h"
#include <memory>
#include "Player.h"
#include "Background.h"
#include "AudioManager.h"
#include "Meteor.h"
#include "Plansza.h"
class Plansza {
public:
Plansza(unsigned int windowHeight, unsigned int windowWidth, sf::RenderWindow *mainWindow,
const sf::Texture& playerTexture, const sf::Texture& playerBulletTexture, const sf::Texture& playerRocketTexture);
Size getSize();
std::vector<Meteor> &getMeteors();
void spawn_meteor();
void update_meteors();
void update();
void spawn_enemy();
void setOutOfBounds(bool status);
void spawn_advanced_enemy();
private:
Size size;
Background background;
Player ship;
AudioManager audioManager;
sf::Texture meteorTexture1;
sf::Texture meteorTexture2;
sf::Texture enemyBulletTexture;
sf::Texture playerTexture;
sf::Texture playerBulletTexture;
sf::Texture playerRocketTexture;
sf::Texture enemyTexture;
sf::Texture advancedEnemyTexture;
sf::Clock spawnClock;
sf::Clock shooterSpawnClock;
std::vector<Enemy> enemies;
std::vector<AdvancedEnemy> AEnemies;
sf::Clock enemySpawnClock;
sf::Clock AenemySpawnClock;
std::vector<Meteor> meteors;
sf::RenderWindow *window;
};
#endif //PLANSZA_H