Dziuala 3 strzlowiec

This commit is contained in:
2024-12-10 20:20:05 +01:00
parent 77eb83c2c3
commit 81b04bae0f
12 changed files with 279 additions and 15 deletions

View File

@@ -3,10 +3,12 @@
#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"
@@ -16,7 +18,8 @@
class Plansza {
public:
Plansza(unsigned int windowHeight,unsigned int windowWidth, sf::RenderWindow *mainWindow);
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();
@@ -26,6 +29,9 @@ public:
void update();
void spawn_enemy();
void setOutOfBounds(bool status);
void spawn_advanced_enemy();
private:
Size size;
Background background;
@@ -33,10 +39,18 @@ private:
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;
};