Zaimplementowano debuff.

Do dokończenia resetowanie debuff
This commit is contained in:
2025-01-13 15:55:45 +01:00
parent 62808a9fbf
commit 67f396ae84
12 changed files with 184 additions and 25 deletions

View File

@@ -16,6 +16,7 @@
#include "Plansza.h"
#include "Heart.hpp"
#include "PowerUp.h"
#include "Debuff.h"
#include "Size.h"
enum ships{
@@ -33,9 +34,11 @@ public:
void spawn_meteor();
void spawn_hearts();
void spawn_power_up();
void spawn_debuff();
void update_meteors();
void update_hearts();
void update_power_ups();
void update_debuffs();
void update();
@@ -44,6 +47,7 @@ public:
void check_PowerUp_collisions();
void check_Heart_collisions();
void check_Meteor_collisions();
void check_Debuff_collisions();
void spawn_player();
void spawn_enemy();
@@ -58,19 +62,27 @@ public:
static ships selectedShip;
static unsigned int score;
sf::Font font;
private:
Background background;
AudioManager audioManager;
Player *ship;
Size size;
sf::RenderWindow *window;
sf::Clock meteorSpawnClock;
sf::Clock heartSpawnClock;
sf::Clock powerUpSpawnClock;
// Timers
sf::Clock movingSpeedPUTimer;
sf::Clock fireratePUTimer;
sf::Clock tripleShotPUTimer;
sf::Clock spawnClock;
sf::Clock movingSpeedDebuffTimer;
sf::Clock firerateDebuffTimer;
sf::Clock bulletSpeedDebuffTimer;
// Zegary
sf::Clock meteorSpawnClock;
sf::Clock heartSpawnClock;
sf::Clock powerUpSpawnClock;
sf::Clock debuffSpawnClock;
// sf::Clock spawnClock;
sf::Clock scoreClock;
sf::Clock shooterSpawnClock;
sf::Clock enemySpawnClock;
@@ -78,6 +90,8 @@ private:
sf::Clock BomberSpawnClock;
sf::Clock KamikadzeSpawnClock;
sf::Clock WiazkowiecSpawnClock;
//Textury
sf::Texture playerTexture;
sf::Texture playerBulletTexture;
sf::Texture playerRocketTexture;
@@ -96,6 +110,11 @@ private:
sf::Texture movingSpeedPowerUpTexture;
sf::Texture fireratePowerUpTexture;
sf::Texture tripleShotPowerUpTexture;
sf::Texture movingSpeedDebuffTexture;
sf::Texture firerateDebuffTexture;
sf::Texture bulletSpeedDebuffTexture;
// Tablice
std::vector<Enemy> enemies;
std::vector<AdvancedEnemy> AEnemies;
std::vector<Bomber> BEnemies;
@@ -105,6 +124,9 @@ private:
std::vector<Heart> hearts;
std::vector<sf::Sprite> heartStats;
std::vector<PowerUp> powerUps;
std::vector<Debuff> debuffs;
// Zmienne prymitywne
bool gameOver = false;
};