Multiple fixes

Obracające się meteoryty, koniec gry przy natrafieniu na meteoryt.
Poprawione sprajty statku, meteorytu i pocisku
This commit is contained in:
2024-11-21 15:50:25 +01:00
parent b16fd9fad5
commit 2bdfbb193c
9 changed files with 42 additions and 16 deletions

View File

@@ -1,10 +1,10 @@
#include "../headers/Actor.h"
// TODO: Naprawić krzywy sprite statku
Actor::Actor(int x, int y, std::string path) {
loadTexture(path);
position.x = x;
position.y = y;
actorSprite.setOrigin(actorSprite.getLocalBounds().width / 2, actorSprite.getLocalBounds().height / 2); // wycentrowanie sprite
actorSprite.setPosition(x, y);
}
@@ -39,3 +39,7 @@ void Actor::updateBullets() {
}
}
}
void Actor::setMovingSpeed(float speed) {
moving_speed = speed;
}