Strzela z kolizja

This commit is contained in:
2024-12-09 23:09:44 +01:00
parent 13066709a7
commit a81cf284d0
8 changed files with 91 additions and 51 deletions

View File

@@ -1,14 +0,0 @@
#ifndef ENEMY_BULLET_H
#define ENEMY_BULLET_H
#include "Projectile.h"
class EnemyBullet : public Projectile {
public:
EnemyBullet(float x, float y, sf::Texture &texture);
void update() override;
void setOutOfBounds(bool status);
};
#endif // ENEMY_BULLET_H

View File

@@ -17,11 +17,14 @@ public:
void moveRight() override;
void moveUp() override;
void moveDown() override;
void takeDamage();
bool isAlive() const;
std::vector<Rocket>& getRockets();
private:
std::chrono::steady_clock::time_point lastShotTime = std::chrono::steady_clock::now();
std::vector<Rocket> rockets;
sf::Texture rocketTexture;
int health = 3; // Liczba punktów życia gracza
sf::Texture bulletTexture;
};