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

23 lines
547 B
C

3 years ago
#ifndef SPRITENODE_H
#define SPRITENODE_H
#include "scenenode.h"
class SpriteNode : public SceneNode
{
public:
explicit SpriteNode(const sf::Texture& texture);
explicit SpriteNode(const sf::Texture& texture,
const sf::IntRect& rect);
virtual ~SpriteNode();
private:
sf::Sprite sprite;
virtual void drawCurrent(sf::RenderTarget& target, sf::RenderStates states) const;
};
using SpriteNodeUPtr = std::unique_ptr<SpriteNode>;
using SpriteNodeSPtr = std::shared_ptr<SpriteNode>;
#endif // SPRITENODE_H