This repository has been archived on 2025-06-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
LotoStatek/sources/Beam.cpp

18 lines
419 B
C++

#include "../headers/Beam.h"
#include <iostream>
Beam::Beam(int x, int y, const sf::Texture& texture) {
if (texture.getSize().x > 0 && texture.getSize().y > 0) {
beamSprite.setPosition(x, y);
} else {
std::cerr << "Błąd: Tekstura wiązki nie została poprawnie załadowana." << std::endl;
}
beamSprite.setTexture(texture);
}
sf::Sprite Beam::getSprite() {
return beamSprite;
}