Statek miga
przy uderzeniu w meteoryt
This commit is contained in:
@@ -105,13 +105,14 @@ void Plansza::update() {
|
||||
update_hearts();
|
||||
ship.updateBullets();
|
||||
|
||||
ship.update();
|
||||
window->draw(ship.getSprite());
|
||||
|
||||
|
||||
// trochę dziwny sposób ale jednak działa
|
||||
for (auto &meteor: meteors) {
|
||||
if (ship.getSprite().getGlobalBounds().intersects(meteor.getSprite().getGlobalBounds())) {
|
||||
ship.dealDamage();
|
||||
ship.onHit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user