class Tile
{
public:
float X = 0;
float Y = 0;
sf::Texture* texture;
void setTexture(sf::Texture* texture)
{
this->texture = texture;
}
Tile(sf::Texture* texture = 0, float X = 0, float Y = 0)
: texture(texture)
, X(X)
, Y(Y)
{
}
void draw(sf::RenderWindow& window)
{
sf::Sprite sprite;
sprite.setTexture(*texture);
sprite.setPosition(X, Y);
window.draw(sprite);
}
};