Implementacja naliczania punktów za zabicie wrogów
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "../headers/AdvancedEnemy.h"
|
||||
#include "../headers/Bullet.h"
|
||||
#include "../headers/Plansza.h"
|
||||
|
||||
AdvancedEnemy::AdvancedEnemy(int x, int y, const sf::Texture& texture, const sf::Texture& bulletTexture) : Actor(x, y, texture) {
|
||||
actorSprite.setTexture(texture);
|
||||
@@ -85,5 +86,6 @@ bool AdvancedEnemy::isAlive() const {
|
||||
void AdvancedEnemy::takeDamage() {
|
||||
if (--hp <= 0) {
|
||||
alive = false;
|
||||
Plansza::score += 10;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user