Implementacja naliczania punktów za zabicie wrogów

This commit is contained in:
2024-12-14 20:32:08 +01:00
parent 9432cd94fe
commit 94eddb457f
7 changed files with 18 additions and 7 deletions

View File

@@ -1,9 +1,9 @@
#include "../headers/Wiazkowiec.h"
#include <iostream>
#include "../headers/Bullet.h"
#include <random>
#include "../headers/Plansza.h"
Wiazkowiec::Wiazkowiec(int x, int y, const sf::Texture& texture) : Actor(x, y, texture), beam(0, 0, 50.f, 50.f, sf::Color::Red) {
actorSprite.setTexture(texture);
@@ -176,6 +176,7 @@ bool Wiazkowiec::isAlive() const {
void Wiazkowiec::takeDamage() {
if (--hp <= 0) {
alive = false;
Plansza::score += 10;
}
}