Implementacja naliczania punktów za zabicie wrogów
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user