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.
22 lines
547 B
22 lines
547 B
#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
|
|
|