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