Serduszka działają
do zrobienia jeszcze animacja uderzenia się w meteoryt (miganie) i wybuch statku przy uderzeniu się w meteoryt po raz trzeci
This commit is contained in:
@@ -24,6 +24,25 @@ Position Actor::getPosition() {
|
||||
return {position.x, position.y};
|
||||
}
|
||||
|
||||
unsigned int Actor::getHP() {
|
||||
return hp;
|
||||
}
|
||||
|
||||
void Actor::dealDamage() {
|
||||
if(damageDealClock.getElapsedTime().asSeconds() > 1) {
|
||||
if(hp > 0) {
|
||||
hp--;
|
||||
}
|
||||
damageDealClock.restart();
|
||||
}
|
||||
}
|
||||
|
||||
void Actor::healUP() {
|
||||
if(hp < 3){
|
||||
hp++;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<Bullet> &Actor::getBullets() {
|
||||
return bullets;
|
||||
}
|
||||
@@ -38,4 +57,4 @@ void Actor::updateBullets() {
|
||||
|
||||
void Actor::setMovingSpeed(float speed) {
|
||||
moving_speed = speed;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user