21 lines
412 B
C++
21 lines
412 B
C++
#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);
|
|
}
|