Laser naprawiono

This commit is contained in:
2025-01-05 18:20:19 +01:00
parent c4c83382c3
commit 6b45443c75
8 changed files with 39 additions and 35 deletions

View File

@@ -3,6 +3,7 @@
#include <iostream>
Beam::Beam(int x, int y, const sf::Texture& texture) {
beamSprite.setOrigin(beamSprite.getLocalBounds().width/2, beamSprite.getLocalBounds().height/2);
if (texture.getSize().x > 0 && texture.getSize().y > 0) {
beamSprite.setPosition(x, y);
} else {
@@ -15,3 +16,7 @@ sf::Sprite Beam::getSprite() {
return beamSprite;
}
void Beam::setRotation(float angle) {
beamSprite.setRotation(angle);
}