5 #include <SFML/Graphics.hpp> 12 BlockSFML::BlockSFML(
double x,
double y, sf::RenderWindow &window,
const string &textureFile) : windowSFML(window), transformation(
Transformation::getInstance()) {
15 if(!texture.loadFromFile(textureFile)) {
16 throw runtime_error(
"Couldn't load block texture image: " + textureFile);
18 texture.setSmooth(
true);
19 sprite.setTexture(texture);
26 sf::FloatRect rect =
sprite.getLocalBounds();
void setSize(pair< double, double > newSize)
sf::Sprite sprite
The sprite of the BlockSFML.
All the game gui elements of the Arkanoid game.
void setPosition(double x, double y)