You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
412 B

#include "spritenode.h"
SpriteNode::SpriteNode(const sf::Texture& texture)
{
sprite.setTexture(texture);
}
SpriteNode::~SpriteNode()
{}
SpriteNode::SpriteNode(const sf::Texture& texture, const sf::IntRect& rect)
{
sprite.setTexture(texture);
sprite.setTextureRect(rect);
}
void SpriteNode::drawCurrent(sf::RenderTarget& target, sf::RenderStates states) const
{
target.draw(sprite, states);
}