Złączono i wszystko działa, ale trzeba zrobić mocny refactor Planszy bo za dużo niewiadomo skąd biorących się pętli

This commit is contained in:
2024-12-13 20:05:11 +01:00
parent fdf67f4bc2
commit 80a4b1b397
5 changed files with 30 additions and 83 deletions

View File

@@ -39,30 +39,14 @@ public:
delete ship; // usuwanie wskaźnika ship
}
private:
sf::RenderWindow *window;
Background background;
AudioManager audioManager;
Player *ship;
Size size;
sf::RenderWindow *window;
sf::Font font;
Size size;
sf::Texture meteorTexture1;
sf::Texture meteorTexture2;
sf::Texture heartTexture;
sf::Texture heartTextureGray;
sf::Clock meteorSpawnClock;
sf::Clock heartSpawnClock;
sf::Texture enemyBulletTexture;
sf::Texture WiazkaTexture;
sf::Texture BombaTexture;
sf::Texture playerTexture;
sf::Texture playerBulletTexture;
sf::Texture playerRocketTexture;
sf::Texture enemyTexture;
sf::Texture advancedEnemyTexture;
sf::Texture BomberEnemyTexture;
sf::Texture KamikadzeTexture;
sf::Texture WiazkowiecTexture;
sf::Clock spawnClock;
sf::Clock scoreClock;
sf::Clock shooterSpawnClock;
@@ -71,6 +55,21 @@ private:
sf::Clock BomberSpawnClock;
sf::Clock KamikadzeSpawnClock;
sf::Clock WiazkowiecSpawnClock;
sf::Texture playerTexture;
sf::Texture playerBulletTexture;
sf::Texture playerRocketTexture;
sf::Texture enemyTexture;
sf::Texture enemyBulletTexture;
sf::Texture advancedEnemyTexture;
sf::Texture BomberEnemyTexture;
sf::Texture BombaTexture;
sf::Texture KamikadzeTexture;
sf::Texture WiazkowiecTexture;
sf::Texture WiazkaTexture;
sf::Texture meteorTexture1;
sf::Texture meteorTexture2;
sf::Texture heartTexture;
sf::Texture heartTextureGray;
std::vector<Enemy> enemies;
std::vector<AdvancedEnemy> AEnemies;
std::vector<Bomber> BEnemies;
@@ -81,7 +80,6 @@ private:
std::vector<sf::Sprite> heartStats;
bool gameOver = false;
unsigned int score = 0;
bool isPlayerSpawned = false;
};
#endif //PLANSZA_H