1
General discussions / Multiple IntRects in a single Sprite
« on: June 15, 2020, 08:42:27 pm »
I'm trying to do level gen but I want to have a single sprite for the level. I have a sprite sheet and i would like to assign different textures to different "areas" of a sprite.
The code above I know would replace the texture rect but is there a way that I can have both?
sprite.setTextureRect(sf::IntRect(0, 0, 32, 32));
sprite.setTextureRect(sf::IntRect(32,32,32,32));
sprite.setTextureRect(sf::IntRect(32,32,32,32));
The code above I know would replace the texture rect but is there a way that I can have both?