Merge remote-tracking branch 'origin/serduszka'

# Conflicts:
#	CMakeLists.txt
#	headers/Actor.h
#	headers/Plansza.h
#	headers/Player.h
#	sources/Plansza.cpp
#	sources/Player.cpp
This commit is contained in:
2024-12-13 19:48:39 +01:00
10 changed files with 242 additions and 10 deletions

View File

@@ -21,6 +21,25 @@ Position Actor::getPosition() {
return {position.x, position.y};
}
unsigned int Actor::getHP() {
return hp;
}
void Actor::dealDamage() {
if(damageDealClock.getElapsedTime().asSeconds() > 1.5) {
if(hp > 0) {
hp--;
}
damageDealClock.restart();
}
}
void Actor::healUP() {
if(hp < 3){
hp++;
}
}
std::vector<Bullet> &Actor::getBullets() {
return bullets;
}
@@ -39,4 +58,4 @@ void Actor::updateBullets() {
void Actor::setMovingSpeed(float speed) {
moving_speed = speed;
}
}