18 lines
419 B
C++
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;
|
|
}
|
|
|